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

  1. Sign in to Tag Manager and select an account.
  2. Click Tags > New.
  3. Click Tag Configuration > Custom HTML.
  4. Copy & paste your script.
  5. Click Save and save the tag without triggers.
Google Tag Manager Script Tag

Trigger tag

  1. Open the Analytics page view tag for the Analytics property linked to your container.
  2. Click Tag Configuration > Advanced Settings > Tag Sequencing.
  3. 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.
  4. Configure the tag to fire once per page, then save it.
  5. Publish your Tag Manager container for the changes to take effect.
Google Tag Manager Script Trigger