Track the #hash portion of the URL fragment

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 #hash portion of URL fragments to include relevant information in analytics.

Track the #hash portion of the URL fragment

By default, Genesys Predictive Engagement removes the fragment #hash part of the URL. However, you may want to track the URL fragment to analyze relevant information that it contains.

To include the URL fragments in the URLs tracked:

  1. Log in as an administrator.
  2. Go to Settings > Tracking Settings.
  3. Enable the Keep Page URL fragments setting.

Before you enable this setting, beware that, pageviews are recorded on page load by default. If your website renders different content based on the URL fragment (without issuing a page reload), you can track these interactions as individual pageviews. To do so, call the ac('pageview') method each time the URL fragment changes, passing in the desired page location.