If you wish to override the website page name, you can give your snippet a custom page name. This is especially useful for dynamically generated pages where the appended URL string is not important for reporting purposes.
(You can also override this using the page tracking option under Settings.)
Page Track Types:
- Capture Page Name ONLY - This is the default setting. It captures the file name of your website pages (i.e., /page-name.html).
- Capture Full URL String - This optional setting captures the file name of your website pages, as well as any appended information (i.e., /page-name.html?var=123)
- Capture Page Title Tags - This setting captures the HTML title tag of your website pages, instead of your page name. This is an advanced option for those that choose to customize their web page's HTML title tags to be unique to the page.
To apply custom name pages, simply add this line to your snippet, after your DID:
var MyPageName='Your Page Name Here';
For vanity or sub domains, add:
var MyPageName = window.location.href.replace("https://","");
IMPORTANT: After updating your snippet with this code, you must contact Support to activate this advanced tracking option.
Important: The variable, MyPageName, is case sensitive, so it must show in your HTML exactly like it is shown above (capital M, small y, capital P, small a, small g, small e, capital N, small a, small m, small e). The 'Your Page Name Here' portion is not case sensitive, and you can replace what is between the single quote (') marks with your own identifying text.