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

From Genesys Documentation
Jump to: navigation, search
(Published)
(Published)
Line 19: Line 19:
 
|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|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=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.}}
Line 128: Line 128:
 
**{{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
 +
}}{{Section
 +
|sectionHeading=Deploy the snippet
 +
|Type=Structured
 +
|anchor=DeploySnippet
 +
|alignment=Vertical
 +
|gif=No
 +
|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}}. }}
 +
 +
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:
 +
 +
*{{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.}}
 +
|fullwidth=No
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Deployment notes
 +
|Type=Structured
 +
|anchor=DeploymentNotes
 +
|alignment=Horizontal
 +
|image=ScriptTags.png
 +
|gif=No
 +
|structuredtext={{NoteFormat|Remove the script tags from the snippet before you deploy it.|}}
 +
 +
*Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main page 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.
 
|fullwidth=No
 
|fullwidth=No
 
|Status=No
 
|Status=No
Line 135: Line 164:
 
|Type=Structured
 
|Type=Structured
 
|anchor=TagManagers
 
|anchor=TagManagers
|alignment=Horizontal
+
|alignment=Vertical
|image=ScriptTags.png
 
 
|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:
Line 143: Line 171:
 
*{{Link-AnywhereElse|product=ATC|version=Current|manual=Event|topic=Adobe_Launch}}
 
*{{Link-AnywhereElse|product=ATC|version=Current|manual=Event|topic=Adobe_Launch}}
 
*Any other tag manager
 
*Any other tag manager
|fullwidth=Yes
+
|fullwidth=No
|structuredtextwide====Deployment notes===
+
|Status=No
{{NoteFormat|The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading.}}
+
}}{{Section
 
+
|sectionHeading=Deploy the snippet manually
*Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main page of the website you want to track.
+
|Type=Structured
*Remove the script tags.
+
|anchor=DeployManually
*Paste the tracking snippet in the element of the website template page before the closing tag.
+
|alignment=Horizontal
*Paste the snippet in the head section.
+
|image=Snippets.png
*Do not deploy the tracking snippet in an iframe.
+
|gif=No
 
+
|structuredtext=#'''Admin''' > '''Altocloud''' > '''Tracking Snippet'''.
For more details about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_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}}.
 +
|fullwidth=No
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section

Revision as of 11:24, November 6, 2019

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:

Copy the snippet

Feature coming soon
  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.
Important
  • 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

Feature coming soon
Genesys Predictive Engagement provides the following types of 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

Feature coming soon
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 page 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:

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?

Error reference

Ad blockers

9/17: David Trihy to create a research spike on ad blockers in general for next sprint (38)When this is ironed out, add this text to the Before you begin section as Step 2:


The effects of [#AdBlockers ad blockers]

on Altocloud.
Ad blockers are plug-ins or browser extensions that prevent tracking software, such as trackers used for advertising purposes, from running on a website. Because Genesys Predictive Engagement is a type of tracking software, some ad blockers detect and block it.
Important
Do not use uBlock on any webpages that you want to track with Altocloud.

This is not accurate. We can't control when our customers' customers install uBlock. What we really need to say is that our customers need to prompt their customers to disable any ad blockers in order to experience the best user experience on their site.

How uBlock affects Genesys Predictive Engagement

uBlock adversely affects Genesys Predictive Engagement 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.
Comments or questions about this documentation? Contact us for support!