Difference between revisions of "ATC/Current/AdminGuide/Tracking snippet"

From Genesys Documentation
Jump to: navigation, search
(Published)
(Published)
Line 3: Line 3:
 
|DisplayName=Tracking snippet
 
|DisplayName=Tracking snippet
 
|TocName=Tracking snippet
 
|TocName=Tracking snippet
|Context=Learn how to enable visitor tracking on your website.
+
|Context=Learn about Genesys Predictive Engagement's tracking abilities and how you can start tracking visitors on your website.{{BarbFeatureTemp|Feature=Web messaging}}This article applies only to customers using web chat. If you are a Genesys Cloud customer, we encourage you to use the new {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_web_messaging|display text=web messaging}} feature to replace web chat.
 
|ComingSoon=No
 
|ComingSoon=No
 
|Platform=PureConnect, GenesysCloud, GenesysEngage-cloud
 
|Platform=PureConnect, GenesysCloud, GenesysEngage-cloud
Line 11: Line 11:
 
**'''Journey '''>''' Settings''' > '''Edit''', or '''View'''
 
**'''Journey '''>''' Settings''' > '''Edit''', or '''View'''
 
|Section={{Section
 
|Section={{Section
|sectionHeading=About web messaging
 
|anchor=WebMessaging
 
|alignment=Vertical
 
|structuredtext={{BarbFeatureTemp|Feature=Web messaging}}This article applies only to customers using web chat. If you are a Genesys Cloud customer, we encourage you to use the new {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_web_messaging|display text=web messaging}} feature to replace web chat. To start tracking, [https://developer.genesys.cloud/api/digital/webmessaging/configure.html configure Messenger] and then use the [https://developer.genesys.cloud/api/digital/webmessaging/messengersdk/ Messenger JavaScript SDK] to configure how you want to track web events.
 
|Status=No
 
}}{{Section
 
|sectionHeading=Overview
 
|anchor=Deploy
 
|alignment=Horizontal
 
|Media=Image
 
|image=GPE_deploy_diagram.png
 
|structuredtext=#Review {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=BeforeYouBegin|display text=Before you begin}}.
 
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#GetSnippet|display text=Copy the snippet.}}
 
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#Customize|display text=Optionally customize the snippet.}}
 
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=Deploy the snippet.}}
 
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#VerifySnippet|display text=Verify that the snippet works.}}
 
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|display text=Configure web tracking.}}
 
{{NoteFormat|See a solutions article that includes the tracking snippet: {{#mintydocs_link:topic=Solution/ChatSolutions|standalone}}|2}}
 
|Status=No
 
}}{{Section
 
 
|sectionHeading=Before you begin
 
|sectionHeading=Before you begin
 
|anchor=BeforeYouBegin
 
|anchor=BeforeYouBegin
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=Before you deploy the {{MINTYDOCSPRODUCT}} tracking snippet be sure you understand:
+
|structuredtext=Read about the type of data that Genesys Predictive Engagement tracks and how to ensure that you track visitor data in a regulatory-compliant manner. Understand the implications of using ad blocking software. Finally, learn how the tracking snippet works and the types of tracking snippets available.
  
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_tracking|display text=All about tracking with {{MINTYDOCSPRODUCT}}}}.
+
*{{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=About_data_tracking}}
*How to deploy the tracking snippet to be compliant with {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=GDPR}}.
+
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=GDPR|display text=Predictive Engagement and GDPR}}
*The effect of {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=ad blockers}} on {{MINTYDOCSPRODUCT}}.
+
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=Ad blockers}}
*How to {{Link-Standalone|topic=ATC/GPEandWidgets|display text=prepare widgets for use with {{MINTYDOCSPRODUCT}}}}.
+
*{{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}
 +
**{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TypesofSnippets|display text=Types of snippets}}
 +
**{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=SnippetRecs|display text=Snippet recommendations}}
 +
*{{Link-Standalone|topic=ATC/GPEandWidgets|display text={{MINTYDOCSPRODUCT}} and widgets}}
 +
*{{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=Tracking_snippet|anchor=Deploy|display text=Deployment overview}}
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 55: Line 39:
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Copy the snippet
+
|sectionHeading=Types of tracking snippets and recommendations
|anchor=GetSnippet
 
|alignment=Horizontal
 
|Media=Image
 
|image=TrackingSnippet.png
 
|structuredtext={{MINTYDOCSPRODUCT}} provides a tracking snippet that you can copy and paste. Since you are logged in to Genesys Cloud, the tracking snippet already contains your organization ID and region.
 
 
 
#Determine which snippet to use:
 
#*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#TypesofSnippets|display text=Types of snippets.}}
 
#*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=SnippetRecs|display text=Snippet recommendations.}}
 
#In Admin in Genesys Cloud, open the '''Global Settings''' page and then click the '''Tracking Snippet''' tab.
 
#Copy the tracking snippet.
 
#Paste the snippet. For more information about where to paste the snippet, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=Deploy the snippet}}. <br />
 
|Status=No
 
}}{{Section
 
|sectionHeading=Types of tracking snippets
 
 
|anchor=TypesofSnippets
 
|anchor=TypesofSnippets
 
|alignment=Vertical
 
|alignment=Vertical
Line 77: Line 46:
 
===SPA snippet===
 
===SPA snippet===
 
The SPA snippet can track activity on Single Page Applications (SPAs). SPAs load dynamic content on demand without requiring a hard reload of the HTML page. The SPA snippet can also track when visitors click relative links, which the Website snippet does not. The SPA snippet works on SPAs such as Angular, React, and Vue.js. For more information about the additional tracking options available with the SPA snippet, see {{Link-AnywhereElse|product=ATC|version=Current|manual=SDK|topic=autotrackURLChange}}.
 
The SPA snippet can track activity on Single Page Applications (SPAs). SPAs load dynamic content on demand without requiring a hard reload of the HTML page. The SPA snippet can also track when visitors click relative links, which the Website snippet does not. The SPA snippet works on SPAs such as Angular, React, and Vue.js. For more information about the additional tracking options available with the SPA snippet, see {{Link-AnywhereElse|product=ATC|version=Current|manual=SDK|topic=autotrackURLChange}}.
|Status=No
+
 
}}{{Section
+
===Snippet recommendations===
|sectionHeading=Snippet recommendations
+
{{{!}} class="wikitable" style="font-size: 14px;"
|anchor=SnippetRecs
 
|alignment=Vertical
 
|structuredtext={{{!}} class="wikitable" style="font-size: 14px;"
 
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}'''If you have this type of website...'''
 
{{!}}{{!}}'''If you have this type of website...'''
Line 98: Line 64:
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Customize how the snippet tracks activity (optional)
+
|sectionHeading=Deployment overview
 +
|anchor=Deploy
 +
|alignment=Horizontal
 +
|Media=Image
 +
|image=GPE_deploy_diagram.png
 +
|structuredtext=#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#GetSnippet|display text=Copy the snippet.}}
 +
#(Optional) {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#Customize|display text=Customize the snippet.}}
 +
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=Deploy the snippet.}}
 +
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#VerifySnippet|display text=Verify that the snippet works.}}
 +
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|display text=Configure web tracking.}}
 +
{{NoteFormat|For more information about advanced chat routing, see  {{#mintydocs_link:topic=Solution/ChatSolutions|standalone}}.|2}}
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Copy the snippet
 +
|anchor=GetSnippet
 +
|alignment=Horizontal
 +
|Media=Image
 +
|image=TrackingSnippet.png
 +
|structuredtext={{MINTYDOCSPRODUCT}} provides a tracking snippet that you can copy and paste. Since you are logged in to Genesys Cloud, the tracking snippet already contains your organization ID and region.
 +
 
 +
#Determine {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#TypesofSnippets|display text=which snippet}} to use.
 +
#In Admin in Genesys Cloud, open the '''Global Settings''' page and then click the '''Tracking Snippet''' tab.
 +
#Copy the tracking snippet.
 +
#Paste the snippet. For more information about where to paste the snippet, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=Deploy the snippet}}. <br />
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=(Optional) Customize how the snippet tracks activity
 
|anchor=Customize
 
|anchor=Customize
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=You can customize how the snippet tracks activity on your website:
+
|structuredtext=You can customize how the snippet tracks activity on your website.
  
*To refine how {{MINTYDOCSPRODUCT}} tracks activity on your website, see {{Link-SomewhereInThisVersion|manual=Event|topic=About_event_tracking}}.
+
*To customize how {{MINTYDOCSPRODUCT}} tracks activity on your website, see {{Link-SomewhereInThisVersion|manual=Event|topic=About_event_tracking}}.
*You can also customize the {{MINTYDOCSPRODUCT}} tracking snippet with functions from the {{Link-SomewhereInThisVersion|manual=SDK}}. For example:
+
*To customize the {{MINTYDOCSPRODUCT}} tracking snippet with functions, see the {{Link-SomewhereInThisVersion|manual=SDK}}.
**{{Link-SomewhereInThisVersion|manual=SDK|display text=Use the Journey JavaScript SDK to track page view events and to configure how {{MINTYDOCSPRODUCT}} updates cookies. }}
 
**{{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking|display text=Configure advanced tracking to enable tracking across multiple domains.}}
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 112: Line 102:
 
|anchor=DeploySnippet
 
|anchor=DeploySnippet
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=After you {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=GetSnippet|display text=copy the snippet}}, review the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploymentNotes|display text=deployment notes}}. Then, follow the instructions to deploy the tracking snippet:
+
|structuredtext====About deploying the snippet===
  
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TagManagers|display text=Deploy the snippet with a tag manager.}}
+
*Deploy the widgets transport above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet.
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeployManually|display text=Deploy the snippet manually.}}
 
|Status=No
 
}}{{Section
 
|sectionHeading=Deployment notes
 
|anchor=DeploymentNotes
 
|alignment=Vertical
 
|structuredtext=*{{Link-Standalone|topic=ATC/GPEandWidgets|display text=Deploy the widgets transport}} above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet.
 
 
*Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main window of the website to track.
 
*Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main window of the website to track.
 
*Paste the tracking snippet in the head section of the website template page before the closing tag.
 
*Paste the tracking snippet in the head section of the website template page before the closing tag.
Line 127: Line 110:
 
*The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading. For more information about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}.
 
*The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading. For more information about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}.
  
<br />
+
===Deployment instructions===
|Status=No
+
{{NoteFormat|{{Link-Standalone|topic=ATC/GPEandWidgets|display text=Deploy the widgets transport}} transport above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet.
}}{{Section
+
|}}After you {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=GetSnippet|display text=copy the snippet}}, do one of the following:
|sectionHeading=Deploy the snippet with a tag manager
 
|anchor=TagManagers
 
|alignment=Vertical
 
|structuredtext=To deploy the {{MINTYDOCSPRODUCT}} tracking snippet, use your preferred tag manager. For example:
 
 
 
*{{Link-SomewhereInThisVersion|manual=Event|topic=Google_Tag_Manager|anchor=VideoGTMDeploy|display text=Deploy the tracking snippet with Google Tag Manager}}
 
*{{Link-AnywhereElse|product=ATC|version=Current|manual=Event|topic=Adobe_Launch}}
 
*Any other tag manager
 
  
 +
*To deploy the tracking snippet manually, paste the copied snippet on your website.
 +
*To deploy the tracking snippet using Google Tag Manager, see {{Link-SomewhereInThisVersion|manual=Event|topic=Google_Tag_Manager|anchor=VideoGTMDeploy|display text=Deploy the tracking snippet with Google Tag Manager}}.
 +
*To deploy the tracking snippet using Adobe Launch, see {{Link-AnywhereElse|product=ATC|version=Current|manual=Event|topic=Adobe_Launch}}.
 +
*To deploy the tracking snippet using another tag manager, see the tag manager vendor's instructions.
 
{{NoteFormat|
 
{{NoteFormat|
*Deploy the widgets transport above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet.
+
uBlock and other ad blocking software is known to block tag managers, in which case the tracking snippet deployed through the tag manager would also be blocked. For more information, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=Ad blockers}}.|}}<br />
*uBlock and other ad blocking software is known to block tag managers, in which case the tracking snippet deployed through the tag manager would also be blocked. For more information, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=Ad blockers}}.|}}
 
|FAQHeading=Can I use a tag management system to deploy the tracking snippet?
 
|Status=No
 
}}{{Section
 
|sectionHeading=Deploy the snippet manually
 
|anchor=DeployManually
 
|alignment=Vertical
 
|structuredtext=#On the '''Tracking Snippet''' page in Genesys Cloud, copy the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TypesofSnippets|display text=type of tracking snippet}} that you need.
 
#Before you paste the snippet on your website, review the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploymentNotes|display text=deployment notes}}.
 
{{NoteFormat|Deploy the widgets transport above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet.
 
|}}<br />
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 157: Line 125:
 
|anchor=VerifySnippet
 
|anchor=VerifySnippet
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=When the tracking snippet is executed properly and initialized:
+
|structuredtext=After deploying the tracking snippet, use Live Now to verify that {{MINTYDOCSPRODUCT}} is tracking your website activity. You should see an update every 4-5 seconds.
  
*Use Live Now to verify that {{MINTYDOCSPRODUCT}} is tracking your website activity.
+
===Troubleshoot the snippet===
*You should see an update every 4-5 seconds.<br />
+
If the tracking snippet does not work properly when you load your web pages, check the following:
|Status=No
 
}}{{Section
 
|sectionHeading=Troubleshoot the snippet
 
|anchor=TroubleshootSnippet
 
|alignment=Vertical
 
|structuredtext=If the tracking snippet does not work properly when you load your web pages, check the following things:
 
  
 
*Is the snippet on the correct page?
 
*Is the snippet on the correct page?
*Is the snippet placed correctly in the header?
+
*Is the snippet in the correct place in the page header?
*Are all of the parameters specified correctly?
+
*Are the parameters defined correctly?
 
*Are there any typos, missing characters, or extra white space?
 
*Are there any typos, missing characters, or extra white space?
 
*Were any characters replaced with their printable equivalents?
 
*Were any characters replaced with their printable equivalents?
 
*Is the domain on the list of allowed domains?
 
*Is the domain on the list of allowed domains?
  
For more suggestions, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploymentNotes|display text=Deployment notes}}.<br />
+
For more suggestions, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=about deploying the snippet}}.
|FAQHeading=How can I troubleshoot the tracking snippet?
+
 
|Status=No
+
===Error reference===
}}{{Section
+
{{{!}} class="wikitable" width="865" data-mce-style="height: 266px;" style="height: 266px;"
|sectionHeading=Error reference
 
|anchor=ErrorSnippet
 
|alignment=Vertical
 
|structuredtext={{{!}} class="wikitable" style="height: 266px;" width="865" data-mce-style="height: 266px;"
 
 
{{!}}-
 
{{!}}-
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}'''Error code'''
+
{{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}'''Error code'''
{{!}} style="width: 660.078px;" data-mce-style="width: 660.078px;"{{!}}'''Description'''
+
{{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}'''Description'''
 
{{!}}-
 
{{!}}-
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}403 error
+
{{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}403 error
{{!}} style="width: 660.078px;" data-mce-style="width: 660.078px;"{{!}}Is your domain in the list of {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|anchor=AllowedDomains|display text=allowed domains}}?
+
{{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Is your domain in the list of {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|anchor=AllowedDomains|display text=allowed domains}}?
 
{{!}}-
 
{{!}}-
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}404 error
+
{{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}404 error
{{!}} style="width: 660.078px;" data-mce-style="width: 660.078px;"{{!}}Is there extra white space in the snippet?
+
{{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Is there extra white space in the snippet?
 
+
'''Note:''' In a URL, white space is encoded as %20.
'''Note:''' In a URL, white space is encoded as %20.<br />
 
 
{{!}}-
 
{{!}}-
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}Bad request
+
{{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}Bad request
{{!}} style="width: 660.078px;" data-mce-style="width: 660.078px;"{{!}}Is there extra white space in the snippet?
+
{{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Is there extra white space in the snippet?
 
+
'''Note:''' In a URL, white space is encoded as %20.
'''Note:''' In a URL, white space is encoded as %20.<br />
 
 
{{!}}-
 
{{!}}-
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}Initialization error
+
{{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}Initialization error
{{!}} style="width: 660.078px;" data-mce-style="width: 660.078px;"{{!}}Are there any of the following in the snippet:<br />
+
{{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Are there any of the following in the snippet:<br />
  
 
*Typos
 
*Typos
Line 207: Line 163:
 
*Dashes and quotes in URLs replaced with printable equivalents<br />
 
*Dashes and quotes in URLs replaced with printable equivalents<br />
 
{{!}}}
 
{{!}}}
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Call the tracking snippet
 +
|anchor=CallSnippet
 +
|alignment=Vertical
 +
|structuredtext=After the tracking snippet is on your webpages, call it using one of the following:
 +
 +
*If you use the traditional snippet, call <code>ac('init')</code> to initialize the Journey JavaScript SDK. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Init}}.
 +
*If you use the SPA snippet, use <code>ac('load')</code> to load the '''autotrackUrlChange''' module and initialize the Journey JavaScript SDK. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Load_modules}} and {{Link-AnywhereElse|product=ATC|version=Current|manual=SDK|topic=autotrackURLChange}}.
 +
 +
After you initialize the Journey JavaScript SDK, Predictive Engagement tracks <code>pageview</code> events when visitors arrive on your webpages. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Tracking_Methods}}.
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Other tracking options
 +
|anchor=OtherOptions
 +
|alignment=Vertical
 +
|structuredtext==== Web tracking ===
 +
Use the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking}} feature to specify the domains to track and configure web-related tracking settings.
 +
 +
=== Custom modules ===
 +
Use a set of {{Link-AnywhereElse|product=ATC|version=Current|manual=SDK|topic=About_modules|display text=modules}} to enhance the functionality that the Journey JavaScript SDK provides.
 +
 +
=== Event tracking with tag managers ===
 +
Use your tag manager to build custom tags and triggers that define how Predictive Engagement tracks activity on your website. For more information, see {{Link-AnywhereElse|product=ATC|version=Current|manual=Event|topic=About_event_tracking}}.
 +
 +
=== Domain and subdomain tracking with cookies ===
 +
Use cookies to track domains and subdomains. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Cookie_usage}} and {{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking}}.
 
|Status=No
 
|Status=No
 
}}
 
}}
 
}}
 
}}

Revision as of 18:56, May 3, 2021

Learn about Genesys Predictive Engagement's tracking abilities and how you can start tracking visitors on your website.

Feature coming soon: Web messaging

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

Prerequisites

Before you begin

Read about the type of data that Genesys Predictive Engagement tracks and how to ensure that you track visitor data in a regulatory-compliant manner. Understand the implications of using ad blocking software. Finally, learn how the tracking snippet works and the types of tracking snippets available.

Ad blockers

Ad blockers are plug-ins or browser extensions that improve page load times and minimize questionable tracking. The majority of ad blockers tested with out-of-the-box settings do not interfere with Genesys Predictive Engagement's tracking capabilities. However, there are a couple considerations if you use uBlock Origin:

  • uBlock Origin disables Genesys Predictive Engagement's tracking web beacons; this effectively prevents Genesys Predictive Engagement's tracking capabilities.
  • uBlock Origin and uBlock Plus Adblocker block popular tag managers such as Adobe Tag Manager, Google Tag Manager, and more.
Important
If you use a tag manager to manage JavaScript and tracking on your website, consider adding ad blocker detection to your site to notify visitors with detected ad blockers that they may be missing some important functionality. Also, instead of using a tag manager to deploy the Genesys Predictive Engagement tracking snippet, consider placing the tracking snippet directly in the body or header of your website.

Types of tracking snippets and recommendations

Website snippet

The Website snippet provides tracking support to traditional webpages that contain little or no dynamic content. Traditional websites load a new HTML page whenever the visitor navigates to a different URL. To provide tracking support to traditional webpages, the Website snippet calls ac('pageview') each time the web browser loads a new page.

SPA snippet

The SPA snippet can track activity on Single Page Applications (SPAs). SPAs load dynamic content on demand without requiring a hard reload of the HTML page. The SPA snippet can also track when visitors click relative links, which the Website snippet does not. The SPA snippet works on SPAs such as Angular, React, and Vue.js. For more information about the additional tracking options available with the SPA snippet, see autotrackURLChange.

Snippet recommendations

If you have this type of website... Use this snippet...
Not sure SPA
Mix of traditional and SPA pages SPA
Traditional pages only Website

Deployment overview

Copy the snippet

Genesys Predictive Engagement provides a tracking snippet that you can copy and paste. Since you are logged in to Genesys Cloud, the tracking snippet already contains your organization ID and region.

  1. Determine which snippet to use.
  2. In Admin in Genesys Cloud, open the Global Settings page and then click the Tracking Snippet tab.
  3. Copy the tracking snippet.
  4. Paste the snippet. For more information about where to paste the snippet, see Deploy the snippet.

(Optional) Customize how the snippet tracks activity

You can customize how the snippet tracks activity on your website.

Deploy the snippet

About deploying the snippet

  • Deploy the widgets transport above the location where you deploy the Genesys Predictive Engagement tracking snippet.
  • Deploy the Genesys Predictive Engagement tracking snippet on the main window of the website to track.
  • Paste the tracking snippet in the head section of the website template page before the closing tag.
  • Do not deploy the tracking snippet in an iframe.
  • The Genesys Predictive Engagement tracking snippet loads JavaScript asynchronously without slowing down page loading. For more information about how the tracking snippet works, see About the tracking snippet.

Deployment instructions

Important
Deploy the widgets transport transport above the location where you deploy the Genesys Predictive Engagement tracking snippet.
After you copy the snippet, do one of the following:
Important
uBlock and other ad blocking software is known to block tag managers, in which case the tracking snippet deployed through the tag manager would also be blocked. For more information, see Ad blockers.

Verify that the snippet works

After deploying the tracking snippet, use Live Now to verify that Genesys Predictive Engagement is tracking your website activity. You should see an update every 4-5 seconds.

Troubleshoot the snippet

If the tracking snippet does not work properly when you load your web pages, check the following:

  • Is the snippet on the correct page?
  • Is the snippet in the correct place in the page header?
  • Are the parameters defined correctly?
  • Are there any typos, missing characters, or extra white space?
  • Were any characters replaced with their printable equivalents?
  • Is the domain on the list of allowed domains?

For more suggestions, see about deploying the snippet.

Error reference

Error code Description
403 error Is your domain in the list of allowed domains?
404 error Is there extra white space in the snippet?

Note: In a URL, white space is encoded as %20.

Bad request Is there extra white space in the snippet?

Note: In a URL, white space is encoded as %20.

Initialization error Are there any of the following in the snippet:
  • Typos
  • Missing characters
  • Dashes and quotes in URLs replaced with printable equivalents

Call the tracking snippet

After the tracking snippet is on your webpages, call it using one of the following:

  • If you use the traditional snippet, call ac('init') to initialize the Journey JavaScript SDK. For more information, see init.
  • If you use the SPA snippet, use ac('load') to load the autotrackUrlChange module and initialize the Journey JavaScript SDK. For more information, see load and autotrackURLChange.

After you initialize the Journey JavaScript SDK, Predictive Engagement tracks pageview events when visitors arrive on your webpages. For more information, see Tracking methods.

Other tracking options

Web tracking

Use the Web tracking feature to specify the domains to track and configure web-related tracking settings.

Custom modules

Use a set of modules to enhance the functionality that the Journey JavaScript SDK provides.

Event tracking with tag managers

Use your tag manager to build custom tags and triggers that define how Predictive Engagement tracks activity on your website. For more information, see About event tracking with tag managers.

Domain and subdomain tracking with cookies

Use cookies to track domains and subdomains. For more information, see Cookies and Advanced tracking with cookies.

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