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

From Genesys Documentation
Jump to: navigation, search
(Published)
(Published)
Line 25: Line 25:
 
|fullwidth=No
 
|fullwidth=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Prerequisites
+
|sectionHeading=Copy the snippet from the Admin UI
|FAQHeading=What information do I need to deploy the tracking snippet?
 
 
|Type=Structured
 
|Type=Structured
|anchor=prerequisites
+
|anchor=DeploySnippetAdminUI
 
|alignment=Vertical
 
|alignment=Vertical
 
|gif=No
 
|gif=No
|structuredtext=In order to deploy the {{MINTYDOCSPRODUCT}} tracking snippet on your website, you need:
+
|structuredtext=# Go to '''Settings> Tracking Snippet'''. <br />
* Your organization ID
+
# Copy the code.
* Your organization region
+
# Paste the {{MINTYDOCSPRODUCT}} tracking snippet in the <tt></tt> element of the website template page before the <tt></tt> closing <tt></tt> tag.
 
+
{{NoteFormat|
If you copy the {{MINTYDOCSPRODUCT}} tracking snippet from the Admin UI, the tracking snippet automatically contains this information as arguments for the <tt>ac('init') </tt> function.
+
* Since you are logged in to the Admin UI, the  {{MINTYDOCSPRODUCT}} 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 {{#mintydocs_link:manual=Developers|topic=GDPRReqs}}.<br />
If you do not know your organization or your region, contact [mailto:customercare@genesys.com customercare@genesys.com]
+
* The last argument in the {{MINTYDOCSPRODUCT}} 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}}
 
|fullwidth=No
 
|fullwidth=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Use a tag management system
+
|sectionHeading=Deploy the snippet with a tag management system
 
|FAQHeading=Why doesn't my tag management system properly deploy the tracking snippet?
 
|FAQHeading=Why doesn't my tag management system properly deploy the tracking snippet?
 
|Type=Structured
 
|Type=Structured
Line 53: Line 53:
 
* When properly executed and initialized, the pinging should be frequent (once every 4-5 seconds), and it should return status code 200.
 
* When properly executed and initialized, the pinging should be frequent (once every 4-5 seconds), and it should return status code 200.
 
* When you copy the tracking snippet into your tag manager, omit both <tt><script></tt> and <tt></script></tt> tags.
 
* When you copy the tracking snippet into your tag manager, omit both <tt><script></tt> and <tt></script></tt> tags.
|fullwidth=No
 
}}{{Section
 
|sectionHeading=Use the Admin UI
 
|Type=Structured
 
|anchor=DeploySnippetAdminUI
 
|alignment=Vertical
 
|gif=No
 
|structuredtext=The Altocloud Admin UI also provides a way to copy and paste the tracking snippet.
 
# Go to '''Settings> Tracking Snippet'''. <br />
 
# Copy the code.
 
# Paste the {{MINTYDOCSPRODUCT}} tracking snippet in the <tt></tt> element of the website template page before the <tt></tt> closing <tt></tt> tag.
 
{{NoteFormat|
 
* Since you are logged in to the Admin UI, the  {{MINTYDOCSPRODUCT}} 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 {{#mintydocs_link:manual=Developers|topic=GDPRReqs}}.<br />
 
* The last argument in the  {{MINTYDOCSPRODUCT}} 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}}
 
 
|fullwidth=No
 
|fullwidth=No
 
}}{{Section
 
}}{{Section

Revision as of 14:21, March 1, 2019

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', 'YOUR-ORGANIZATION-ID', { region: 'YOUR-REGION' });
  ac('pageview');
</script>

Copy the snippet from the Admin UI

  1. Go to Settings> Tracking Snippet.
  2. Copy the code.
  3. Paste the Genesys Predictive Engagement tracking snippet in the element of the website template page before the closing tag.
Important
  • 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.

Deploy the snippet with 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 Dynamic Tag Manager, and any others that provide the option to add custom JavaScript code.

Notes for using a tag manager

  • Execute the tracking snippet on the main window of the website you want to track.
  • Do not execute the tracking snippet in an iframe.
  • When properly executed and initialized, the pinging should be frequent (once every 4-5 seconds), and it should return status code 200.
  • When you copy the tracking snippet into your tag manager, omit both <script> and </script> tags.

Troubleshooting

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?


Important
If you copy and paste the tracking snippet into an email or other editing program, that program may insert or replace characters in the tracking snippet. If you need to copy and paste the tracking snippet, use a text editor to ensure a clean copy and paste.

Error reference

Comments or questions about this documentation? Contact us for support!