ROI Tracking for Google Tag Manager

As ROI Tracking works by adding Javascript to your website pages, it's possible to add it using Google Tag Manager (GTM).

Follow the same steps laid out in the main ROI Tracking instructions, using GTM's Custom HTML option to add the relevant ROI Tracking script.

Example

This basic example adds the main ROI Tracking script to all pages (first image), and then marks the ROI transaction as complete on a particular page (second image).

  • The Tag Configuration uses Custom HTML to paste the necessary ROI Tracking script
  • Both tags are set to only fire once per page
  • The main ROI Tracking script is triggered for all page views
  • If triggering the complete tag for a given page, use the Window Loaded trigger, to make sure that the main ROI Tracking script has loaded first
GTM tag to load

GTM tag to load

GTM tag to complete

GTM tag to complete

📘

Example

Only a basic transaction completion is shown here, but a full implementation should set the revenue and use a unique transaction ID, as described in the main ROI Tracking instructions.

FAQ

Transactions are not being marked complete, or; my completion page is giving an error about "Mxm is not defined"

  • Check that the main load tag is firing on all page views
  • If the complete tag is triggered for a particular page (ie. rather than for a user interaction like click event), check that it is triggered by Window Loaded rather than simply by Page View or Dom Ready

Revenue value reported in Maxemail lower than expected

The value used in the setRevenue() method must be a whole number. No currency symbols or decimal points are allowed. eg. £200.00 is tracked as 20000.