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

From Genesys Documentation
Jump to: navigation, search
(Published)
Line 2: Line 2:
 
|Standalone=No
 
|Standalone=No
 
|DisplayName=Tracking snippet
 
|DisplayName=Tracking snippet
|Platform=PureEngage, PureConnect, PureCloud
 
 
|TocName=Tracking snippet
 
|TocName=Tracking snippet
 +
|Context=Learn how to enable visitor tracking on your website.
 
|ComingSoon=No
 
|ComingSoon=No
|Context=Learn how to enable visitor tracking on your website.
+
|Platform=PureEngage, PureConnect, PureCloud
 
|Prereq='''Prerequisites'''
 
|Prereq='''Prerequisites'''
  
Line 13: Line 13:
 
|sectionHeading=Overview
 
|sectionHeading=Overview
 
|anchor=Deploy
 
|anchor=Deploy
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Horizontal
 
|alignment=Horizontal
 +
|Media=Image
 
|image=SnippetProcess.png
 
|image=SnippetProcess.png
|Media=Image
 
 
|structuredtext=#Review {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=BeforeYouBegin|display text=Before you begin}}.
 
|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#GetSnippet|display text=Copy the snippet.}}
Line 25: Line 23:
 
#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|display text=Configure web tracking.}}
 
#{{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}}
 
{{NoteFormat|See a solutions article that includes the tracking snippet: {{#mintydocs_link:topic=Solution/ChatSolutions|standalone}}|2}}
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Before you begin
 
|sectionHeading=Before you begin
 
|anchor=BeforeYouBegin
 
|anchor=BeforeYouBegin
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=Before you deploy the {{MINTYDOCSPRODUCT}} tracking snippet be sure you understand:
 
|structuredtext=Before you deploy the {{MINTYDOCSPRODUCT}} tracking snippet be sure you understand:
Line 38: Line 33:
 
*How to deploy the tracking snippet to be compliant with {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=GDPR}}.
 
*How to deploy the tracking snippet to be compliant with {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=GDPR}}.
 
*The effect of {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=ad blockers}} on {{MINTYDOCSPRODUCT}}.
 
*The effect of {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=ad blockers}} on {{MINTYDOCSPRODUCT}}.
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Ad blockers
 
|sectionHeading=Ad blockers
 
|anchor=AdBlockers
 
|anchor=AdBlockers
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=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 {{MINTYDOCSPRODUCT}}'s tracking capabilities. However, there are a couple considerations if you use uBlock Origin:   
 
|structuredtext=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 {{MINTYDOCSPRODUCT}}'s tracking capabilities. However, there are a couple considerations if you use uBlock Origin:   
Line 54: Line 46:
  
 
Also, instead of using tag a manager to deploy the {{MINTYDOCSPRODUCT}} tracking snippet, consider manually placing the tracking snippet directly in the body or header of your website.|}}
 
Also, instead of using tag a manager to deploy the {{MINTYDOCSPRODUCT}} tracking snippet, consider manually placing the tracking snippet directly in the body or header of your website.|}}
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Copy the snippet
 
|sectionHeading=Copy the snippet
 
|anchor=GetSnippet
 
|anchor=GetSnippet
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=
+
|structuredtext=#Click '''Admin'''.
 
 
#Click '''Admin'''.
 
 
#Under '''Altocloud''', click '''Tracking Snippet'''. <br />
 
#Under '''Altocloud''', click '''Tracking Snippet'''. <br />
 
#To determine which snippet to use:
 
#To determine which snippet to use:
Line 70: Line 57:
 
#*Review the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=SnippetRecs|display text=snippet recommendations.}}<br />
 
#*Review the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=SnippetRecs|display text=snippet recommendations.}}<br />
 
#Use a text editor to copy the snippet.<br />Since you are logged in to PureCloud, the {{MINTYDOCSPRODUCT}} tracking snippet already contains your organization ID and Genesys region.
 
#Use a text editor to copy the snippet.<br />Since you are logged in to PureCloud, the {{MINTYDOCSPRODUCT}} tracking snippet already contains your organization ID and Genesys region.
|fullwidth=Yes
 
|structuredtextwide={{NoteFormat|
 
* Use a text editor to ensure a clean copy and paste. Other programs may insert or replace characters in the tracking snippet.  }}
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Types of tracking snippets
 
|sectionHeading=Types of tracking snippets
 
|anchor=TypesofSnippets
 
|anchor=TypesofSnippets
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext={{MINTYDOCSPRODUCT}} provides the following types of snippets:
 
|structuredtext={{MINTYDOCSPRODUCT}} provides the following types of snippets:
Line 111: Line 93:
 
</script>
 
</script>
 
</source>
 
</source>
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Snippet recommendations
 
|sectionHeading=Snippet recommendations
 
|anchor=SnippetRecs
 
|anchor=SnippetRecs
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=  
+
|structuredtext={{{!}} class="wikitable" style="font-size: 14px;"
{{{!}} class="wikitable" style="font-size: 14px;"
 
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}'''If you have this type of website...'''
 
{{!}}{{!}}'''If you have this type of website...'''
Line 134: Line 112:
 
{{!}}{{!}}Website
 
{{!}}{{!}}Website
 
{{!}}}
 
{{!}}}
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Customize how the snippet tracks activity (optional)
 
|sectionHeading=Customize how the snippet tracks activity (optional)
 
|anchor=Customize
 
|anchor=Customize
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=If needed, you can customize how the snippet tracks activity on your website:
 
|structuredtext=If needed, you can customize how the snippet tracks activity on your website:
Line 148: Line 123:
 
**{{Link-SomewhereInThisVersion|manual=SDK|display text=Use the Journey JavaScript SDK to track page view events and to configure how Altocloud updates cookies. }}
 
**{{Link-SomewhereInThisVersion|manual=SDK|display text=Use the Journey JavaScript SDK to track page view events and to configure how Altocloud updates cookies. }}
 
**{{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking|display text=Configure advanced tracking to enable tracking across multiple domains.}}
 
**{{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking|display text=Configure advanced tracking to enable tracking across multiple domains.}}
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Deploy the snippet
 
|sectionHeading=Deploy the snippet
 
|anchor=DeploySnippet
 
|anchor=DeploySnippet
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext={{NoteFormat|The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading. For more details about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}. }}  
 
|structuredtext={{NoteFormat|The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading. For more details about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}. }}  
Line 163: Line 135:
 
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TagManagers|display text=Deploy the snippet with a tag manager.}}
 
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TagManagers|display text=Deploy the snippet with a tag manager.}}
 
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeployManually|display text=Deploy the snippet manually.}}
 
*{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeployManually|display text=Deploy the snippet manually.}}
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Deployment notes
 
|sectionHeading=Deployment notes
 
|anchor=DeploymentNotes
 
|anchor=DeploymentNotes
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Horizontal
 
|alignment=Horizontal
 +
|Media=Image
 
|image=ScriptTags.png
 
|image=ScriptTags.png
|Media=Image
 
 
|structuredtext={{NoteFormat|Remove the script tags from the snippet before you deploy it.|}}
 
|structuredtext={{NoteFormat|Remove the script tags from the snippet before you deploy it.|}}
  
Line 178: Line 147:
 
*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.
 
*Do not deploy the tracking snippet in an iframe.
 
*Do not deploy the tracking snippet in an iframe.
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Deploy the snippet with a tag manager
 
|sectionHeading=Deploy the snippet with a tag manager
|FAQHeading=Why doesn't my tag management system properly deploy the tracking snippet?
 
 
|anchor=TagManagers
 
|anchor=TagManagers
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=To easily deploy the {{MINTYDOCSPRODUCT}} tracking snippet, use your preferred tag manager. For example:
 
|structuredtext=To easily deploy the {{MINTYDOCSPRODUCT}} tracking snippet, use your preferred tag manager. For example:
Line 194: Line 159:
  
 
{{NoteFormat|If you use uBlock ad blocking software, do not use a tag management system to deploy the {{MINTYDOCSPRODUCT}} tracking snippet. For more information, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=Ad blockers}}.|}}
 
{{NoteFormat|If you use uBlock ad blocking software, do not use a tag management system to deploy the {{MINTYDOCSPRODUCT}} tracking snippet. For more information, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=Ad blockers}}.|}}
|fullwidth=No
+
|FAQHeading=Can I use a tag management system to deploy the tracking snippet?
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Deploy the snippet manually
 
|sectionHeading=Deploy the snippet manually
 
|anchor=DeployManually
 
|anchor=DeployManually
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Horizontal
 
|alignment=Horizontal
 +
|Media=Image
 
|image=Snippets.png
 
|image=Snippets.png
|Media=Image
 
 
|structuredtext=#'''Admin''' > '''Altocloud''' > '''Tracking Snippet'''.
 
|structuredtext=#'''Admin''' > '''Altocloud''' > '''Tracking Snippet'''.
 
#Next to the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TypesofSnippets|display text=type of snippet}} you need, click '''Copy''' snippet.
 
#Next to the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TypesofSnippets|display text=type of snippet}} you need, click '''Copy''' snippet.
 
#Before you paste the snippet on your website, review the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploymentNotes|display text=deployment notes}}.
 
#Before you paste the snippet on your website, review the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploymentNotes|display text=deployment notes}}.
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Verify that the snippet works
 
|sectionHeading=Verify that the snippet works
 
|anchor=VerifySnippet
 
|anchor=VerifySnippet
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=When the tracking snippet is properly executed and initialized:
 
|structuredtext=When the tracking snippet is properly executed and initialized:
Line 219: Line 179:
 
*Use Live Now to verify that {{MINTYDOCSPRODUCT}} is tracking your website activity.
 
*Use Live Now to verify that {{MINTYDOCSPRODUCT}} is tracking your website activity.
 
*You should see an update every 4-5 seconds.<br />
 
*You should see an update every 4-5 seconds.<br />
|fullwidth=No
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Troubleshoot the snippet
 
|sectionHeading=Troubleshoot the snippet
|FAQHeading=How can I troubleshoot the tracking snippet??
 
 
|anchor=TroubleshootSnippet
 
|anchor=TroubleshootSnippet
|Standalone=No
 
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=If the tracking snippet does not work properly when you load it on your web pages, check the following things:
 
|structuredtext=If the tracking snippet does not work properly when you load it on your web pages, check the following things:
Line 238: Line 194:
  
 
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=DeploymentNotes|display text=Deployment notes}}.<br />
|fullwidth=No
+
|FAQHeading=How can I troubleshoot the tracking snippet??
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Error reference
 
|sectionHeading=Error reference
|Standalone=No
+
|anchor=ErrorSnippet
|ComingSoon=No
 
 
|alignment=Vertical
 
|alignment=Vertical
|anchor=ErrorSnippet
 
 
|structuredtext={{{!}} class="wikitable" style="height: 266px;" width="865" data-mce-style="height: 266px;"
 
|structuredtext={{{!}} class="wikitable" style="height: 266px;" width="865" data-mce-style="height: 266px;"
 
{{!}}-
 
{{!}}-

Revision as of 13:28, January 30, 2020

Learn how to enable visitor tracking on your website.

Prerequisites

Overview

Before you begin

Before you deploy the Genesys Predictive Engagement tracking snippet be sure you understand:

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 in order to notify your users with detected ad blockers that they may be missing some important functionality. Also, instead of using tag a manager to deploy the Genesys Predictive Engagement tracking snippet, consider manually placing the tracking snippet directly in the body or header of your website.

Copy the snippet

  1. Click Admin.
  2. Under Altocloud, click Tracking Snippet.
  3. To determine which snippet to use:
  4. Use a text editor to copy the snippet.
    Since you are logged in to PureCloud, the Genesys Predictive Engagement tracking snippet already contains your organization ID and Genesys region.

Types of tracking snippets

Genesys Predictive Engagement provides the following types of snippets:

  • Website snippet
  • Single Page Application (SPA) snippet

Website snippet

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

<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;u.charset='utf-8';d.parentNode.insertBefore(u,d)
  })(window, document, 'script', 'https://example.com, 'ac');
  ac('init', 'a061a3fe-7a80-4b50-9d3b-df88c0f9efad', { region: 'use1' });
  ac('pageview');
</script>

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 users click relative links, which the Website snippet does not. The SPA snippet works on SPAs such as Angular, React, Vue.js, and so on. For more information about the additional tracking options available with the SPA snippet, see [[ATC/Current/SDK/autoTrackURLChange|]].

<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;u.charset='utf-8';d.parentNode.insertBefore(u,d)
  })(window, document, 'script', 'https://apps.inindca.com/journey/sdk/js/web/v1/ac.js', 'ac');
  ac('init', 'a061a3fe-7a80-4b50-9d3b-df88c0f9efad', { environment: 'dev' });
  ac('load', 'autotrackUrlChange');
</script>

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

Customize how the snippet tracks activity (optional)

If needed, you can customize how the snippet tracks activity on your website:

Deploy the snippet

Important
The Genesys Predictive Engagement tracking snippet loads JavaScript asynchronously without slowing down page loading. For more details about how the tracking snippet works, see About the tracking snippet.

After you copy the snippet, review the deployment notes. Then follow the instructions to deploy the tracking snippet:

Deployment notes

Important
Remove the script tags from the snippet before you deploy it.
  • Deploy the Genesys Predictive Engagement tracking snippet on the main window of the website you want 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.

Deploy the snippet with a tag manager

To easily deploy the Genesys Predictive Engagement tracking snippet, use your preferred tag manager. For example:

Important
If you use uBlock ad blocking software, do not use a tag management system to deploy the Genesys Predictive Engagement tracking snippet. For more information, see Ad blockers.

Deploy the snippet manually

  1. Admin > Altocloud > Tracking Snippet.
  2. Next to the type of snippet you need, click Copy snippet.
  3. Before you paste the snippet on your website, review the deployment notes.

Verify that the snippet works

When the tracking snippet is properly executed and initialized:

  • 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 it on your web pages, check the following things:

  • Is the snippet on the correct page?
  • Is the snippet correctly placed in the header?
  • Are all of the parameters specified correctly?
  • Are there any typos, missing characters, or extra white space?
  • Have any characters been replaced by their printable equivalents?
  • Is the domain on the list of allowed domains?

For more suggestions, see Deployment notes.

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
Comments or questions about this documentation? Contact us for support!