Difference between revisions of "ATC/Current/AdminGuide/DeployTrackingSnippet"
From Genesys Documentation
DannaShirley (talk | contribs) (Published) |
DannaShirley (talk | contribs) (Published) |
||
Line 29: | Line 29: | ||
|alignment=Vertical | |alignment=Vertical | ||
|structuredtext=In order to deploy the Altocloud tracking snippet on your website, you will need: | |structuredtext=In order to deploy the Altocloud tracking snippet on your website, you will need: | ||
− | * Your organization ID. | + | * Your organization ID. The value you supply will replace <span>''''YOUR-ORGANIZATION-ID'''' in the '''ac('init')''' function. </span> |
− | * Your organization region. | + | * Your organization region. To determine the value to use here, look up the '''datacenter''' value in {{#Widget:ExtLink|link=https://all.docs.genesys.com/ATC/Regions|displaytext=Regions}}and replace ''''YOUR-ORGANIZATION-REGION'''' with the corresponding datacenter in the '''ac('init')''' function. If you do not know which region your organization is in, contact [mailto:customercare@genesys.com customercare@genesys.com] |
|fullwidth=No | |fullwidth=No | ||
}}{{Section | }}{{Section | ||
Line 47: | Line 47: | ||
# Copy and paste the code from this article, or go to '''Settings> Account Settings'''. <br /> | # Copy and paste the code from this article, or go to '''Settings> Account Settings'''. <br /> | ||
# On the '''Tracking Code''' tab, copy the code. | # On the '''Tracking Code''' tab, copy the code. | ||
− | # Paste the tracking snippet in the element of | + | # Paste the tracking snippet in the <tt></tt> element of thewebsite template page before the <tt></tt> closing <tt></tt> tag.<br /> |
# Supply your organization ID and your Genesys data center. | # Supply your organization ID and your Genesys data center. | ||
{{NoteFormat| | {{NoteFormat| |
Revision as of 13:40, December 18, 2018
This topic is part of the manual Genesys Predictive Engagement Administrator's Guide for version Current of Genesys Predictive Engagement.
Contents
Deploy the Altocloud tracking snippet to enable visitor tracking on your website.
About the tracking snippet
The following code is the Altocloud 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', 'YOUR-ORGANIZATION-ID', { datacenter: 'YOUR-ORGANIZATION-REGION' });
ac('pageview');
</script>
Prerequisites
In order to deploy the Altocloud tracking snippet on your website, you will need:
- Your organization ID. The value you supply will replace 'YOUR-ORGANIZATION-ID' in the ac('init') function.
- Your organization region. To determine the value to use here, look up the datacenter value in Regionsand replace 'YOUR-ORGANIZATION-REGION' with the corresponding datacenter in the ac('init') function. If you do not know which region your organization is in, contact customercare@genesys.com
Use a tag management system
To easily deploy the 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> Account Settings.
- On the Tracking Code tab, copy the code.
- Paste the tracking snippet in the element of thewebsite template page before the closing tag.
- Supply your organization ID and your Genesys data center.
Important
- Do not load the Altocloud 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 Altocloud 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.
Comments or questions about this documentation? Contact us for support!