Use Google Tag Manager with Altocloud
Contents
Learn how to use Google Tag Manager (GTM) to customize and deploy the Genesys Predictive Engagement tracking snippet.
Use Google Tag Manager
When you use GTM to deploy the Genesys Predictive Engagement tracking snippet, Genesys Predictive Engagement always tracks standard customer journey events including pageviews and form entries. You can also use GTM's prebuilt tags, triggers, variables, to track additional events that are specific to your webpage and business needs.
For complete information on how to use Google Tag Manager, see Google's Tag Manager Help.
Deploy the tracking snippet with GTM
This video shows you how to use Google Tag Manager to deploy the Genesys Predictive Engagement tracking snippet on your website. In summary:
- In Google Tag Manager, create a new trigger. For the type, select DOM Ready.
- Create a new tag. For the type, select Custom HTML. Configure the tag to use the new DOM Ready trigger.
- In Genesys Predictive Engagement, and copy the tracking snippet.
- In Google Tag Manager, paste the snippet in the new Custom HTML tag. Remove the Script tags.
- Save your changes and publish your workspace.
Triggers
A trigger is a condition that defines when a tag must run. Google Tag Manager provides a collection of built-in triggers. Additionally, you can create your own trigger.
This example shows the Form Submission trigger, which launches when the user clicks the Sign up button to submit the form.
Example trigger: track when a user scrolls
This example shows how to use the Scroll Depth trigger to capture vertical and horizontal scrolling events on webpages.
- This trigger can fire either on all webpages or on a subset of pages that match the conditions you specify
- Specify the vertical and horizontal scroll depths in either percents or pixels.
- Separate multiple values with commas.
Limitations
The trigger can be executed only once per webpage. It cannot be manually reset. If a page is not scrollable, the trigger always fires. To avoid that, wrap the tag with the following code:
if ($(document).height() > $(window).height()) { /* your tag code */ }Example trigger: track how long a user stays on a page
Example trigger: form submission error
Tags
Tags are code snippets which Google Tag Manager injects into your website and runs when a trigger condition occurs. For complete information on the built-in tags that are available with Google Tag Manager, see Custom tags.
Example tag: sign-up button
Suppress triggering a tag
To prevent a tag from triggering, use event.preventDefault() on a webpage element listener.
Debug
To run Google Tag Manager integration in debug mode, click Preview on your account page.
