Configure advanced tracking
Contents
Learn how to use the Journey JavaScript SDK to refine how Genesys Predictive Engagement tracks customer data. Alternatively, you can refine tracking using your preferred tag manager. For more information, see [[ATC/Current/AdminGuide/About_event_tracking|]].
About advanced tracking
The init function allows you to override the default configuration or settings of the Genesys Predictive Engagement SDK. You can change how Genesys Predictive Engagement sets cookies and how you track your visitors across subdomains or even across multiple domains.
Cookie options
By default, the Journey JavaScript SDK sets the cookie expiration date and determines the cookie domain. To customize these settings, use the following parameters with the init function.
| Name | Description | Default |
|---|---|---|
| allowedLinkers | An array of domains that are allowed to link into the current domain for cross-domain tracking | Null |
| autoLink | All links to the specified domains on the site will be augmented to contain information that allows the linked page to continue the current tracking session | Null |
| cookieDomain | Determines the domain on which the cookies are set | The highest level domain possible |
| cookieExpires | Specifies the expiration time in seconds for the actmi, _actmu and _actvc cookies. For example, 1 year = 365 days * 24 hours * 60 minutes * 60 seconds = 31536000 seconds. | 1 year |
| cookiePrefix | Adds a prefix to the names of the Genesys Predictive Engagement cookies | "_" (underscore) |
Example
ac('init', 'YOUR-ORGANIZATION-ID', {
region: 'YOUR-REGION',
cookieDomain: 'YOUR-DOMAIN',
cookieExpires: 31536000,
cookiePrefix: 'YOUR-PREFIX'
});Track a domain and its subdomains
By default, to simplify cross-domain tracking implementations, Genesys Predictive Engagement will automatically write cookies to the highest level domain possible. If you manage both a domain and one or more subdomains such as www.example.com, blog.example.com and store.example.com, the cookie domain used to store cookies will be .example.com.
Tracking subdomains in 2 different accounts
For tracking subdomains separately in 2 different accounts, the Genesys Predictive Engagement tracking snippet needs to be customized to specify the desired domain in the init call:
ac('init', 'YOUR-ORGANIZATION-ID', {
region: 'YOUR-REGION',
cookieDomain: 'subdomain.example.co.uk'
});Track multiple domains
Asymmetric site linking
You can set up asymmetric site linking. In this case, you can carry cookies from example.com to example.co.uk but not the other way around. In this case, the Genesys Predictive Engagement tracking snippet in example.com should remove example.co.uk from allowedLinkers, and autoLink should be removed from the Genesys Predictive Engagement tracking snippet added to example.co.uk.