Difference between revisions of "ATC/Current/AdminGuide/Tracking snippet"
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2") |
(Published) |
||
Line 5: | Line 5: | ||
|Context=Learn how to enable visitor tracking on your website. | |Context=Learn how to enable visitor tracking on your website. | ||
|ComingSoon=No | |ComingSoon=No | ||
− | |Platform=GenesysEngage-cloud | + | |Platform=PureConnect, GenesysCloud, GenesysEngage-cloud |
|Prereq='''Prerequisites''' | |Prereq='''Prerequisites''' | ||
Line 23: | 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}} | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 30: | Line 28: | ||
|anchor=BeforeYouBegin | |anchor=BeforeYouBegin | ||
|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 34: | ||
*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}}. | ||
*How to {{Link-Standalone|topic=ATC/GPEandWidgets|display text=prepare widgets for use with {{MINTYDOCSPRODUCT}}}}. | *How to {{Link-Standalone|topic=ATC/GPEandWidgets|display text=prepare widgets for use with {{MINTYDOCSPRODUCT}}}}. | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 45: | Line 39: | ||
|anchor=AdBlockers | |anchor=AdBlockers | ||
|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 55: | Line 47: | ||
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.|}} | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
|sectionHeading=Copy the snippet | |sectionHeading=Copy the snippet | ||
|anchor=GetSnippet | |anchor=GetSnippet | ||
− | |alignment= | + | |alignment=Horizontal |
− | |Media= | + | |Media=Image |
− | |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. | |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 '''Tracking Snippet''' page. |
− | #* | + | #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 /> |
− | #For information | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 80: | Line 67: | ||
|anchor=TypesofSnippets | |anchor=TypesofSnippets | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext====Website snippet=== | |structuredtext====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 user navigates to a different URL. To provide tracking support to traditional webpages, the Website snippet calls <tt>{{Link-SomewhereInThisVersion|manual=SDK|topic=Pageview|display text=ac('pageview')}}</tt> each time the a new page is loaded by the web browser. | 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 user navigates to a different URL. To provide tracking support to traditional webpages, the Website snippet calls <tt>{{Link-SomewhereInThisVersion|manual=SDK|topic=Pageview|display text=ac('pageview')}}</tt> each time the a new page is loaded by the web browser. | ||
===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 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 {{Link-SomewhereInThisVersion|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 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 {{Link-SomewhereInThisVersion|manual=SDK|topic=autoTrackURLChange}}. | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 93: | Line 76: | ||
|anchor=SnippetRecs | |anchor=SnippetRecs | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext={{{!}} class="wikitable" style="font-size: 14px;" | |structuredtext={{{!}} class="wikitable" style="font-size: 14px;" | ||
{{!}}- | {{!}}- | ||
Line 109: | Line 90: | ||
{{!}}{{!}}Website | {{!}}{{!}}Website | ||
{{!}}} | {{!}}} | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 116: | Line 95: | ||
|anchor=Customize | |anchor=Customize | ||
|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: | ||
*If you need to refine how {{MINTYDOCSPRODUCT}} tracks activity on your website, see {{Link-SomewhereInThisVersion|manual=Event|topic=About_event_tracking}}. | *If you need to refine 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: | *You can also customize the {{MINTYDOCSPRODUCT}} tracking snippet with functions from the {{Link-SomewhereInThisVersion|manual=SDK}}. For example: | ||
− | **{{Link-SomewhereInThisVersion|manual=SDK|display text=Use the Journey JavaScript SDK to track page view events and to configure how | + | **{{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.}} | **{{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 131: | Line 106: | ||
|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}}. | |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: | Then follow the instructions to deploy the tracking snippet: | ||
Line 138: | Line 111: | ||
*{{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.}} | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 145: | Line 116: | ||
|anchor=DeploymentNotes | |anchor=DeploymentNotes | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=*{{Link-Standalone|topic=ATC/GPEandWidgets|display text=Deploy the widgets transport}} above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet. | |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 you want to track. | *Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main window of the website you want to track. | ||
Line 154: | Line 123: | ||
<br /> | <br /> | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 161: | Line 128: | ||
|anchor=TagManagers | |anchor=TagManagers | ||
|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 170: | Line 135: | ||
{{NoteFormat| | {{NoteFormat| | ||
− | *Deploy the widgets transport above the location where you deploy the | + | *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}}.|}} | *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? | |FAQHeading=Can I use a tag management system to deploy the tracking snippet? | ||
|Status=No | |Status=No | ||
Line 179: | Line 143: | ||
|anchor=DeployManually | |anchor=DeployManually | ||
|alignment=Vertical | |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. | |
− | |||
− | |structuredtext=# | ||
− | |||
#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}}. | ||
− | {{NoteFormat|Deploy the widgets transport above the location where you deploy the | + | {{NoteFormat|Deploy the widgets transport above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet. |
|}}<br /> | |}}<br /> | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 193: | Line 152: | ||
|anchor=VerifySnippet | |anchor=VerifySnippet | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=When the tracking snippet is properly executed and initialized: | |structuredtext=When the tracking snippet is properly executed and initialized: | ||
*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 /> | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 206: | Line 161: | ||
|anchor=TroubleshootSnippet | |anchor=TroubleshootSnippet | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=If the tracking snippet does not work properly when you load your web pages, check the following things: | |structuredtext=If the tracking snippet does not work properly when you load your web pages, check the following things: | ||
Line 218: | Line 171: | ||
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 /> | ||
− | |||
|FAQHeading=How can I troubleshoot the tracking snippet? | |FAQHeading=How can I troubleshoot the tracking snippet? | ||
|Status=No | |Status=No | ||
Line 225: | Line 177: | ||
|anchor=ErrorSnippet | |anchor=ErrorSnippet | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|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;" | ||
{{!}}- | {{!}}- | ||
Line 233: | Line 183: | ||
{{!}}- | {{!}}- | ||
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}403 error | {{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}403 error | ||
− | {{!}} style="width: 660.078px;" data-mce-style="width: 660.078px;"{{!}}Is your domain in the list of {{ | + | {{!}} 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}}? |
{{!}}- | {{!}}- | ||
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}404 error | {{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}404 error | ||
Line 252: | Line 202: | ||
*Dashes and quotes in URLs replaced with printable equivalents<br /> | *Dashes and quotes in URLs replaced with printable equivalents<br /> | ||
{{!}}} | {{!}}} | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}} | }} | ||
}} | }} |
Revision as of 13:51, November 4, 2020
Contents
- 1 Overview
- 2 Before you begin
- 3 Ad blockers
- 4 Copy the snippet
- 5 Types of tracking snippets
- 6 Snippet recommendations
- 7 Customize how the snippet tracks activity (optional)
- 8 Deploy the snippet
- 9 Deployment notes
- 10 Deploy the snippet with a tag manager
- 11 Deploy the snippet manually
- 12 Verify that the snippet works
- 13 Troubleshoot the snippet
- 14 Error reference
Learn how to enable visitor tracking on your website.
Prerequisites
- Configure the following permissions in Genesys Cloud:
- Journey > Settings > Edit, or View
Overview
- Review Before you begin.
- Copy the snippet.
- Optionally customize the snippet.
- Deploy the snippet.
- Verify that the snippet works.
- Configure web tracking.
Before you begin
Before you deploy the Genesys Predictive Engagement tracking snippet be sure you understand:
- All about tracking with Genesys Predictive Engagement.
- How to deploy the tracking snippet to be compliant with General Data Protection Regulation (GDPR).
- The effect of ad blockers on Genesys Predictive Engagement.
- How to prepare widgets for use with Genesys Predictive Engagement.
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.
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.
- Determine which snippet to use:
- In Admin in Genesys Cloud, open the Tracking Snippet page.
- Copy the tracking snippet.
- Paste the snippet. For more information about where to paste the snippet, see Deploy the snippet.
Types of tracking snippets
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 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.
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|]].
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:
- If you need to refine how Genesys Predictive Engagement tracks activity on your website, see About event tracking with tag managers.
- You can also customize the Genesys Predictive Engagement tracking snippet with functions from the Journey JavaScript SDK. For example:
Deploy the snippet
After you copy the snippet, review the deployment notes. Then follow the instructions to deploy the tracking snippet:
Deployment notes
- 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 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.
- 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.
Deploy the snippet with a tag manager
To easily deploy the Genesys Predictive Engagement tracking snippet, use your preferred tag manager. For example:
- Deploy the tracking snippet with Google Tag Manager
- Use Adobe Launch with Genesys Predictive Engagement
- Any other tag manager
- Deploy the widgets transport above the location where you deploy the Genesys Predictive Engagement 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 Ad blockers.
Deploy the snippet manually
- On the Tracking Snippet page in Genesys Cloud, copy the type of tracking snippet that you need.
- 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 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:
|