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.

Important
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.

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 Global Settings > Tracking Settings.
  3. Enable the Keep 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.

Comments or questions about this documentation? Contact us for support!