Track a page's canonical URL

From Genesys Documentation
Revision as of 13:34, January 17, 2020 by WikiSysop (talk | contribs)
Jump to: navigation, search
This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.

Track the canonical URL of a page for precise pageview counts.

Canonical URLs eliminate duplicate content

Canonical URLs help webmasters and site administrators eliminate duplicate content from analytics reports.

For example

http://www.example.com/blog

would be treated as a different page than

http://www.example.com/blog?sidebar=0

even though those URLs display the same content. The side-effect of this is that one page view to each page will be reported instead of two pageviews to a single page.

Canonical URLs in links elements

The canonical URL of a page is often specified in a canonical link element, which can be inserted into the section of a web page.

For example:

<link rel="canonical" href="http://example.com/blog" />

How to track a canonical URL

To use your canonical URLs and override the URL that the ac SDK will track, configure the init call to use the canonical link element value when available.

ac('init', 'YOUR-ORGANIZATION-ID', {
  region: 'YOUR-REGION',
  canonicalLink: true
});
Comments or questions about this documentation? Contact us for support!