Difference between revisions of "ATC/Current/AdminGuide/DeployTrackingSnippet"

From Genesys Documentation
Jump to: navigation, search
(Published)
(Published)
Line 7: Line 7:
 
|Section={{Section
 
|Section={{Section
 
|sectionHeading=About the tracking snippet
 
|sectionHeading=About the tracking snippet
 +
|Type=Structured
 
|anchor=AboutSnippet
 
|anchor=AboutSnippet
|Type=Structured
 
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=The following code is the Altocloud tracking snippet that enables you to track visitor activity on your webpages.
+
|structuredtext=The {{MINTYDOCSPRODUCT}} tracking snippet that enables you to track visitor activity on your webpages.  
 
+
<source lang="javascript">  
<source lang="javascript">
 
 
<script>
 
<script>
(function(a,t,c,l,o,u,d){a['_genesysJourneySdk']=o;a[o]=a[o]||function(){
+
  (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),
+
  (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)
+
  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');
+
  })(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('init', '097f989f-1b9a-4d3d-b0d4-11c8f7f9799f', { region: 'use2' });
ac('pageview');
+
  ac('pageview');
 
</script>
 
</script>
 
</source>
 
</source>
Line 25: Line 24:
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Prerequisites
 
|sectionHeading=Prerequisites
 +
|Type=Structured
 
|anchor=prerequisites
 
|anchor=prerequisites
|Type=Structured
 
 
|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 {{MINTYDOCSPRODUCT}} tracking snippet on your website, you will need:
* Your organization ID. The value you supply will replace <span>''''YOUR-ORGANIZATION-ID'''' in the '''ac('init')''' function. </span>
+
* Your organization ID
* 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]
+
* Your organization region  
 +
If you access the tracking snippet through the Admin UI, you these values are already inserted in the tracking snippet.  
 +
 
 +
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
 
|sectionHeading=Use a tag management system
 
|sectionHeading=Use a tag management system
 +
|Type=Structured
 
|anchor=DeploySnippetTagMgmt
 
|anchor=DeploySnippetTagMgmt
|Type=Structured
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=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.
 
|structuredtext=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.
Line 41: Line 43:
 
}}{{Section
 
}}{{Section
 
|sectionHeading=Use the Admin UI
 
|sectionHeading=Use the Admin UI
 +
|Type=Structured
 
|anchor=DeploySnippetAdminUI
 
|anchor=DeploySnippetAdminUI
|Type=Structured
 
 
|alignment=Vertical
 
|alignment=Vertical
 
|structuredtext=The Altocloud Admin UI also provides a way to copy and paste the tracking snippet.
 
|structuredtext=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'''. <br />
+
# Copy and paste the code from this article, or go to '''Settings> Tracking Snippet'''.
 
# Copy the code.
 
# Copy the code.
# Paste the tracking snippet in the <tt></tt> element of the website template page before the <tt></tt> closing <tt></tt> tag.<br />
+
# Paste the tracking snippet in the <tt></tt> element of the website template page before the <tt></tt> closing <tt></tt> tag.
 
# Supply your organization ID and your Genesys data center.
 
# Supply your organization ID and your Genesys data center.
 +
 
{{NoteFormat|
 
{{NoteFormat|
* Do not load the Altocloud tracking snippet unless the visitor provides consent to be tracked. For an example of how to do this, see {{#mintydocs_link:manual=Developers|topic=GDPRReqs}}.<br />
+
* Do not load the Altocloud tracking snippet unless the visitor provides consent to be tracked. For an example of how to do this, see {{#mintydocs_link:topic=GDPRReqs|manual=Developers}}.
 
* The last argument in the Altocloud tracking snippet is  <tt>'ac'</tt>. If your webpage or any third-party JavaScript uses this variable name globally, pass a custom value.<br />
 
* The last argument in the Altocloud tracking snippet is  <tt>'ac'</tt>. If your webpage or any third-party JavaScript uses this variable name globally, pass a custom value.<br />
* When you call <tt>`ac`</tt>, the commands after it, such as <tt>init</tt>, <tt>pageview</tt>, and so on, are queued. When the website template file is completely downloaded, the queued commands are executed.|1}}
+
* When you call <tt>`ac`</tt>, the commands after it, such as <tt>init</tt>, <tt>pageview</tt>, and so on, are queued. When the website template file is completely downloaded, the queued commands are executed.}}
 
|fullwidth=No
 
|fullwidth=No
 
}}
 
}}
 
}}
 
}}

Revision as of 17:46, January 30, 2019

Deploy the Altocloud tracking snippet to enable visitor tracking on your website.

About the tracking snippet

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 will need:

  • Your organization ID
  • Your organization region

If you access the tracking snippet through the Admin UI, you these values are already inserted in the tracking snippet.

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.

  1. Copy and paste the code from this article, or go to Settings> Tracking Snippet.
  2. Copy the code.
  3. Paste the tracking snippet in the element of the website template page before the closing tag.
  4. 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!