Difference between revisions of "ATC/Current/AdminGuide/Tracking snippet"
DannaShirley (talk | contribs) (Published) |
DannaShirley (talk | contribs) (Published) |
||
Line 7: | Line 7: | ||
|Context=Learn how to enable visitor tracking on your website. | |Context=Learn how to enable visitor tracking on your website. | ||
|Prereq='''Prerequisites''' | |Prereq='''Prerequisites''' | ||
− | * [https://help.mypurecloud.com/articles/altocloud-permissions-overview Configure the following permissions in PureCloud:] | + | |
− | ** '''Journey '''>''' Settings''' > '''Edit''', or '''View''' permissions | + | *[https://help.mypurecloud.com/articles/altocloud-permissions-overview Configure the following permissions in PureCloud:] |
+ | **'''Journey '''>''' Settings''' > '''Edit''', or '''View''' permissions | ||
|Section={{Section | |Section={{Section | ||
|sectionHeading=Overview | |sectionHeading=Overview | ||
Line 16: | Line 17: | ||
|image=SnippetProcess.png | |image=SnippetProcess.png | ||
|gif=No | |gif=No | ||
− | |structuredtext=# {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#GetSnippet|display text=Copy the snippet.}} | + | |structuredtext=#{{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#Customize|display text=Optionally customize the snippet.}} |
− | # {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#TagManagers|display text=Deploy the snippet with your preferred tag manager.}} | + | #{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#TagManagers|display text=Deploy the snippet with your preferred tag manager.}} |
− | # {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#VerifySnippet|display text=Verify that the snippet works.}} | + | #{{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.}} | + | #{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|display text=Configure web tracking.}} |
− | {{NoteFormat|See a solutions article that includes the tracking snippet:{{ | + | {{NoteFormat|See a solutions article that includes the tracking snippet: {{#mintydocs_link:topic=Solution/ChatSolutions|standalone}}|2}} |
|fullwidth=No | |fullwidth=No | ||
|Status=No | |Status=No | ||
Line 30: | Line 31: | ||
|gif=No | |gif=No | ||
|structuredtext=Before you deploy the {{MINTYDOCSPRODUCT}} tracking snippet be sure you understand: | |structuredtext=Before you deploy the {{MINTYDOCSPRODUCT}} tracking snippet be sure you understand: | ||
− | * {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_tracking|display text=All about tracking with {{MINTYDOCSPRODUCT}}}}. | + | |
− | * How to deploy the tracking snippet to be compliant with {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=GDPR}}.<br /> | + | *{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_tracking|display text=All about tracking with {{MINTYDOCSPRODUCT}}}}. |
+ | *How to deploy the tracking snippet to be compliant with {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=GDPR}}.<br /> | ||
|fullwidth=No | |fullwidth=No | ||
|Status=No | |Status=No | ||
Line 41: | Line 43: | ||
|gif=No | |gif=No | ||
|structuredtext={{ComingSoon}} | |structuredtext={{ComingSoon}} | ||
− | # Click '''Admin'''. | + | |
− | # Under '''Altocloud''', click '''Tracking Snippet'''. <br /> | + | #Click '''Admin'''. |
− | # To determine which snippet to use: | + | #Under '''Altocloud''', click '''Tracking Snippet'''. <br /> |
− | #* Read about the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#TypesofSnippets|display text=types of snippets.}}<br /> | + | #To determine which snippet to use: |
− | #* Review the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=SnippetRecs | + | #*Read about the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#TypesofSnippets|display text=types of snippets.}}<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. | + | #*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. | ||
|fullwidth=Yes | |fullwidth=Yes | ||
|structuredtextwide={{NoteFormat| | |structuredtextwide={{NoteFormat| | ||
Line 58: | Line 61: | ||
|gif=No | |gif=No | ||
|structuredtext={{ComingSoon}}{{MINTYDOCSPRODUCT}} provides the following types of snippets: | |structuredtext={{ComingSoon}}{{MINTYDOCSPRODUCT}} provides the following types of snippets: | ||
− | * Website snippet | + | |
− | * SPA snippet | + | *Website snippet |
+ | *SPA snippet | ||
===Website snippet=== | ===Website snippet=== | ||
Line 119: | Line 123: | ||
|gif=No | |gif=No | ||
|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=AdminGuide|topic=About_event_tracking}}. | + | |
− | * You can also customize the {{MINTYDOCSPRODUCT}} tracking snippet with functions from the {{Link-SomewhereInThisVersion|manual=SDK}}. For example: | + | *If you need to refine how {{MINTYDOCSPRODUCT}} tracks activity on your website, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_event_tracking}}. |
− | ** {{Link-SomewhereInThisVersion|manual=SDK|display text=Use the Journey JavaScript SDK to track page view events and to configure how Altocloud updates cookies. }} | + | *You can also customize the {{MINTYDOCSPRODUCT}} tracking snippet with functions from the {{Link-SomewhereInThisVersion|manual=SDK}}. For example: |
− | ** {{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking|display text=Configure advanced tracking to enable tracking across multiple domains.}} | + | **{{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.}} | ||
|fullwidth=No | |fullwidth=No | ||
|Status=No | |Status=No | ||
Line 134: | Line 139: | ||
|gif=No | |gif=No | ||
|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: | ||
− | * {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Google_Tag_Manager}} | + | |
− | * {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Adobe_Launch|display text=Adobe Launch}}<br /> | + | *{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Google_Tag_Manager}} |
− | * Any other tag manager | + | *{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Adobe_Launch|display text=Adobe Launch}}<br /> |
+ | *Any other tag manager | ||
|fullwidth=Yes | |fullwidth=Yes | ||
|structuredtextwide====Deployment notes=== | |structuredtextwide====Deployment notes=== | ||
{{NoteFormat|The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading.}} | {{NoteFormat|The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading.}} | ||
− | * Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main page of the website you want to track. | + | |
− | * Remove the script tags. | + | *Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main page of the website you want to track. |
− | * Paste the tracking snippet in the element of the website template page before the closing tag. | + | *Remove the script tags. |
− | * Paste the snippet in the head section. | + | *Paste the tracking snippet in the element of the website template page before the closing tag. |
− | * Do not deploy the tracking snippet in an iframe. | + | *Paste the snippet in the head section. |
+ | *Do not deploy the tracking snippet in an iframe. | ||
+ | |||
For more details about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}. | For more details about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}. | ||
|Status=No | |Status=No | ||
Line 154: | Line 162: | ||
|gif=No | |gif=No | ||
|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. | + | |
− | * You should see an update every 4-5 seconds.<br /> | + | *Use Live Now to verify that {{MINTYDOCSPRODUCT}} is tracking your website activity. |
+ | *You should see an update every 4-5 seconds.<br /> | ||
|fullwidth=No | |fullwidth=No | ||
|Status=No | |Status=No | ||
Line 193: | Line 202: | ||
{{!}} style="width: 178.828px;" data-mce-style="width: 178.828px;"{{!}}Initialization error | {{!}} style="width: 178.828px;" data-mce-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 /> | {{!}} style="width: 660.078px;" data-mce-style="width: 660.078px;"{{!}}Are there any of the following in the snippet:<br /> | ||
− | * Typos | + | |
− | * Missing characters | + | *Typos |
− | * Dashes and quotes in URLs replaced with printable equivalents<br /> | + | *Missing characters |
+ | *Dashes and quotes in URLs replaced with printable equivalents<br /> | ||
{{!}}} | {{!}}} | ||
|Status=No | |Status=No | ||
Line 217: | Line 227: | ||
===How uBlock affects {{MINTYDOCSPRODUCT}}=== | ===How uBlock affects {{MINTYDOCSPRODUCT}}=== | ||
uBlock adversely affects {{MINTYDOCSPRODUCT}} in the following ways | uBlock adversely affects {{MINTYDOCSPRODUCT}} in the following ways | ||
− | * If you use Google Tag Manager, uBlock prevents you from loading the tracking snippet and Journey JavaScript SDK. | + | |
− | * If you use a different JavaScript management approach, the tracking snippet and Journey JavaScript load on your webpages. However, Altocloud will be unable to send beacons or register cookies, effectively preventing it from working as expected. | + | *If you use Google Tag Manager, uBlock prevents you from loading the tracking snippet and Journey JavaScript SDK. |
+ | *If you use a different JavaScript management approach, the tracking snippet and Journey JavaScript load on your webpages. However, Altocloud will be unable to send beacons or register cookies, effectively preventing it from working as expected. | ||
|fullwidth=No | |fullwidth=No | ||
|Status=Yes | |Status=Yes | ||
}} | }} | ||
}} | }} |
Revision as of 22:28, November 5, 2019
Contents
Learn how to enable visitor tracking on your website.
Prerequisites
- Configure the following permissions in PureCloud:
- Journey > Settings > Edit, or View permissions
Overview
- Copy the snippet.
- Optionally customize the snippet.
- Deploy the snippet with your preferred tag manager.
- 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).
Copy the snippet
- Click Admin.
- Under Altocloud, click Tracking Snippet.
- To determine which snippet to use:
- Read about the types of snippets.
- Review the snippet recommendations.
- Read about the types of snippets.
- 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.
- Use a text editor to ensure a clean copy and paste. Other programs may insert or replace characters in the tracking snippet.
Types of tracking snippets
- Website snippet
- 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:
- If you need to refine how Genesys Predictive Engagement tracks activity on your website, see [[ATC/Current/AdminGuide/About_event_tracking|]].
- You can also customize the Genesys Predictive Engagement tracking snippet with functions from the Journey JavaScript SDK. For example:
Deploy the snippet with a tag manager
To easily deploy the Genesys Predictive Engagement tracking snippet, use your preferred tag manager. For example:
- [[ATC/Current/AdminGuide/Google_Tag_Manager|]]
- Adobe Launch
- Any other tag manager
Deployment notes
- Deploy the Genesys Predictive Engagement tracking snippet on the main page of the website you want to track.
- Remove the script tags.
- Paste the tracking snippet in the element of the website template page before the closing tag.
- Paste the snippet in the head section.
- Do not deploy the tracking snippet in an iframe.
For more details about how the tracking snippet works, see About the tracking snippet.
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?