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.
Troubleshooting
The tag doesn't fire
The tag doesn't fire
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.
The overlay shows blank or missing data
The overlay shows blank or missing data
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.