Deploy the tracking snippet

About the tracking snippet

The Genesys Predictive Engagement tracking snippet that enables you to track visitor activity on your webpages.

<script>  (function(a,t,c,l,o,u,d){a['_genesysJourneySdk']=o;a[o]=a[o]||function(){  (a[o].q=a[o].q||[]).push(arguments)},a[o].l=1*new Date();u=t.createElement(c),  d=t.getElementsByTagName(c)[0];u.async=1;u.src=l;d.parentNode.insertBefore(u,d)  })(window, document, 'script', 'https://app.genesys.cloud/journey/sdk/js/web/v1/ac.js', 'ac');  ac('init', '097f989f-1b9a-4d3d-b0d4-11c8f7f9799f', { region: 'use2' });  ac('pageview');</script>

Prerequisites

In order to deploy the Genesys Predictive Engagement tracking snippet on your website, you will need:

  • Your organization ID
  • Your organization region

If you access the tracking snippet through the Admin UI, you these values are already inserted in the tracking snippet.

If you do not know which region your organization is in, contact customercare@genesys.com.

Use a tag management system

To easily deploy the tracking snippet, use a tag management system such as Google Tag Manager, Tealium, Adobe, and any others that provide the option to add custom JavaScript code.

Use the Admin UI

The Predictive Engagement Admin UI also provides a way to copy and paste the tracking snippet.

  1. Copy and paste the code from this article, or go to Settings> Tracking Snippet.
  2. Copy the code.
  3. Paste the tracking snippet in the element of the website template page before the closing tag.
  4. Supply your organization ID and your Genesys data center.
Note:
  • Do not load the Predictive Engagement tracking snippet unless the visitor provides consent to be tracked. 
  • The last argument in the Predictive Engagement tracking snippet is 'ac'. If your webpage or any third-party JavaScript uses this variable name globally, pass a custom value.
  • When you call `ac`, the commands after it, such as init, pageview, and so on, are queued. When the website template file is completely downloaded, the queued commands are executed.