Difference between revisions of "ATC/Current/AdminGuide/Tracking snippet"
DannaShirley (talk | contribs) (Published) |
m (Text replacement - "|Type=Structured" to "|Type=Structured |gif=No") |
||
Line 8: | Line 8: | ||
|sectionHeading=About the tracking snippet | |sectionHeading=About the tracking snippet | ||
|Type=Structured | |Type=Structured | ||
+ | |gif=No | ||
|anchor=AboutSnippet | |anchor=AboutSnippet | ||
|alignment=Vertical | |alignment=Vertical | ||
Line 27: | Line 28: | ||
|FAQHeading=What are the prerequisites for using Altocloud? | |FAQHeading=What are the prerequisites for using Altocloud? | ||
|Type=Structured | |Type=Structured | ||
+ | |gif=No | ||
|anchor=prerequisites | |anchor=prerequisites | ||
|alignment=Vertical | |alignment=Vertical | ||
Line 40: | Line 42: | ||
|sectionHeading=Use a tag management system | |sectionHeading=Use a tag management system | ||
|Type=Structured | |Type=Structured | ||
+ | |gif=No | ||
|anchor=DeploySnippetTagMgmt | |anchor=DeploySnippetTagMgmt | ||
|alignment=Vertical | |alignment=Vertical | ||
Line 47: | Line 50: | ||
|sectionHeading=Use the Admin UI | |sectionHeading=Use the Admin UI | ||
|Type=Structured | |Type=Structured | ||
+ | |gif=No | ||
|anchor=DeploySnippetAdminUI | |anchor=DeploySnippetAdminUI | ||
|alignment=Vertical | |alignment=Vertical |
Revision as of 16:21, January 31, 2019
Contents
Deploy the Genesys Predictive Engagement tracking snippet to enable visitor tracking on your website.
About the tracking snippet
The following code is the Genesys Predictive Engagement tracking snippet that enables you to track visitor activity on your webpages.
<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;d.parentNode.insertBefore(u,d)
})(window, document, 'script', 'https://app.genesys.cloud/journey/sdk/js/web/v1/ac.js', 'ac');
ac('init', '097f989f-1b9a-4d3d-b0d4-11c8f7f9799f', { region: 'use2' });
ac('pageview');
</script>
Prerequisites
In order to deploy the Genesys Predictive Engagement tracking snippet on your website, you need:
- Your organization ID
- Your organization region
If you copy the Genesys Predictive Engagement tracking snippet from the Admin UI, the tracking snippet automatically contains this information as arguments for the ac('init') function.
If you do not know your organization or your region, contact customercare@genesys.com
Use a tag management system
To easily deploy the Genesys Predictive Engagement tracking snippet, use a tag management system such as Google Tag Manager, Tealium, Adobe, and any others that provide the option to add custom JavaScript code.
Use the Admin UI
The Altocloud Admin UI also provides a way to copy and paste the tracking snippet.
- Copy and paste the code from this article, or go to Settings> Tracking Snippet.
- Copy the code.
- Paste the Genesys Predictive Engagement tracking snippet in the element of the website template page before the closing tag.
- Since you are logged in to the Admin UI, the Genesys Predictive Engagement tracking snippet already contains your organization ID and your Genesys region.
- Do not load the tracking snippet unless the visitor provides consent to be tracked. For an example of how to do this, see [[ATC/Current/Developers/GDPRReqs|]].
- The last argument in the Genesys Predictive Engagement tracking snippet is 'ac'. If your webpage or any third-party JavaScript uses this variable name globally, pass a custom value.
- When you call `ac`, the commands after it, such as init, pageview, and so on, are queued. When the website template file is completely downloaded, the queued commands are executed.