Google Tag Manager Destination
Google Tag Manager is used for adding scripts for retrieving predictions from the MorphL API, for your Google Analytics or Google Analytics 360 destination.
Prerequisites
Google Analytics or Google Analytics 360 data source
The GTM integration requires that your ML models use the Google Analytics or Google Analytics 360 data source.
Google Analytics, Google Analytics 360 or Facebook Ads Manager destination
Please see the setup guide for creating a Google Analytics, Google Analytics 360 or Facebook Ads Manager integration script.
Add predictions script in Google Tag Manager
This document describes the Google Tag Manager settings that are required for integrating the MorphL predictions script on an existing website.
Add Custom HTML tag
- Sign in to Tag Manager and select an account.
- Click Tags > New.
- Click Tag Configuration > Custom HTML.
- Copy & paste your script.
- Click Save and save the tag without triggers.
Trigger tag
- Open the Analytics page view tag for the Analytics property linked to your container.
- Click Tag Configuration > Advanced Settings > Tag Sequencing.
- Check the box to fire a tag after this tag fires. Under the Cleanup Tag heading, click the menu and select the desired Custom HTML tag.
- Configure the tag to fire once per page, then save it.
- Publish your Tag Manager container for the changes to take effect.
- Open the Analytics page view tag for the Analytics property linked to your container.
- Click Tag Configuration > Advanced Settings > Tag Sequencing.
- Check the box to fire a tag after this tag fires. Under the Cleanup Tag heading, click the menu and select the desired Custom HTML tag.
- Configure the tag to fire once per page, then save it.
- Publish your Tag Manager container for the changes to take effect.
