Track a page's canonical URL

From Genesys Documentation
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.

This article only applies to customers using web chat. If you are a Genesys Cloud CX customer, we encourage you to use the new web messaging feature to replace web chat.

Canonical URLs eliminate duplicate content

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

For example,

is treated as a different page than

even though those URLs display the same content. The side-effect is that one page view to each page is 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 a section of a webpage.

For example:

<link rel="canonical" href="" />

How to track a canonical URL

To use your canonical URLs and override the URL that the ac SDK tracks, 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!