Skip to main content
This guide covers deploying the Referrer tag through Google Tag Manager (GTM) instead of hard-coding it into your page template.
GTM manages the <script> tag only. The mmWrapper placeholder div still needs to be added directly to your order confirmation page template - GTM tags fire after the page has loaded, so they can populate a div but can’t reliably guarantee it exists first.
1

Add the wrapper div to your page template

In your order confirmation page’s HTML, add:
2

Create the data layer push

On the order confirmation page, push the order details to dataLayer before the GTM container snippet fires (or via your existing checkout data layer event):
3

Create Data Layer Variables in GTM

In GTM, create a Data Layer Variable for each field you pushed above (mmFirstname, mmSurname, mmEmail, mmOrderNumber, mmOrderSubtotal, mmOrderCurrency, mmLocale, mmCouponCode).
4

Create the Custom HTML tag

Add a new Custom HTML tag in GTM:
Use tag-demo.mention-me.com while testing, and switch to tag.mention-me.com only once you’ve verified the integration end-to-end.
5

Set the trigger

Create a Custom Event trigger that fires on the mentionMeReferrer event pushed in step 2, scoped to the order confirmation page.
6

Preview and publish

Use GTM’s Preview mode to confirm the tag fires on the order confirmation page and the overlay renders correctly, then publish the container.
All mandatory and optional parameters are documented on the Referrer tag page - map any of them to data layer variables the same way.

Troubleshooting

Use GTM’s Preview mode to confirm the trigger condition is being met and the data layer event is firing before the tag executes. Check the browser console for errors from the Mention Me tag - see common tag integration errors.
Confirm each Data Layer Variable in GTM matches the key names pushed to dataLayer exactly (case-sensitive), and that the values are URL encoded where needed.
Last modified on July 17, 2026