Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mention-me.com/llms.txt

Use this file to discover all available pages before exploring further.

Setting up Mention Me through Google Tag Manager (GTM) is a flexible way to launch your referral programme with minimal development effort. This guide covers configuring your data layer, creating data variables, and implementing the core tags: Referrer, Referee, Landing Page, and Dashboard.

Your Datalayer

Include first name, surname, email address, order total, order currency and, if running referral in multiple languages, locale. Enter the name of each variable added for the JavaScript code. These must match your JavaScript. Repeat for first name, surname, email, locale, order total and order currency. For more information about the data layer, see: GTM Data Layer Dev Guide

Data Variables

Create a variable for each parameter (name, surname, email, order_number, order_subtotal, order_currency, locale, coupon_code).
1

Open Variables

In GTM, go to Variables and click NEW under User-Defined Variables.
2

Create a Data Layer Variable

Click Choose a variable type… and choose Data Layer Variable. Add a variable name.
3

Save

Save the variable. Repeat for each parameter.
GTM data layer variable configuration

Tag Implementation

The basic integration consists of 3 tags: referrer, referee and landing page.
1

Create a new tag

In GTM, go to Tags and click NEW.
2

Configure as Custom HTML

Click Choose a tag type… and choose Custom HTML. Name the tag.
3

Add tag code and triggering

Add the tag code (see below) and select triggering, then save.

Referrer tag

Replace each variable in curly brackets with your data layer variable name:
<script type="text/javascript" src="https://tag-demo.mention-me.com/api/v2/referreroffer/yourPartnerCodeGoesHere?situation=postpurchase&email={{email}}&surname={{surname}}&firstname={{firstname}}&locale={{locale}}&order_currency={{order_currency}}&order_subtotal={{total}}&order_number={{order_number}}&coupon_code={{coupon_code}}"></script>
Trigger:
  • Scroll to Triggering and click Choose a trigger…
  • Click + to add a new trigger
  • Choose Custom Event (e.g., on purchase), or Page View – DOM Ready (e.g., when URL contains “confirmation”)
GTM referrer tag trigger configuration

Referee tag

<script type="text/javascript" src="https://tag-demo.mention-me.com/api/v2/refereefind/yourPartnerCodeGoesHere?situation=checkout&locale={{locale}}"></script>
Trigger:
  • Add a new trigger: usually Custom Event (e.g. “Proceed to checkout”), Page View – DOM Ready (e.g. when URL contains “checkout”), or History Change (for SPAs).
GTM referee tag trigger configuration Add this div next to your coupon code box:
<!-- Begin Mention Me referee placeholder div -->
<div id="mmWrapper"></div>
<!-- End Mention Me referee placeholder div -->

Landing page tag

<script type="text/javascript" src="https://tag-demo.mention-me.com/api/v2/referreroffer/yourPartnerCodeGoesHere?situation=landingpage&locale={{locale}}"></script>
Trigger:
  • Add a new Page View – DOM Ready trigger (e.g., when URL contains “refer-a-friend”)
Create the landing page and add:
<!-- Begin Mention Me referrer placeholder div -->
<div id="mmWrapper"></div>
<!-- End Mention Me referrer placeholder div -->

Dashboard (within account page) tag

Replace variables in curly brackets with your data layer variable names:
<!-- Begin Mention Me dashboard integration -->
<script type="text/javascript">
if (window.MentionMeFiredTags != undefined && window.MentionMeFiredTags != '') {
  var situation = 'dashboard';
  var implementation = 'embed';
  if (window.MentionMeFiredTags[implementation + situation] == true) {
    delete window.MentionMeFiredTags[implementation + situation];
  }
}
</script>
<script src="https://tag-demo.mention-me.com/api/v2/dashboard/yourPartnerCodeGoesHere?email={{email}}&surname={{surname}}&firstname={{firstname}}&locale={{locale}}&situation=dashboard&implementation=embed"/>
<!-- End Mention Me dashboard integration -->
Trigger:
  • Add a new Page View – DOM Ready trigger (e.g., when URL contains “dashboard”)
Create a dashboard page within your Customer Account area, then add:
<!-- Begin Mention Me dashboard placeholder div -->
<div id="mmWrapper"></div>
<!-- End Mention Me dashboard placeholder div -->

Testing

Use preview mode to place an order on your live site and check you have set up the variables correctly. You can also give us access to the GTM Preview so we can test the tags. GTM preview mode for testing tags

Publish

Once the demo tags have been tested, remove the -demo from the tag URLs and publish live.
1

Submit for publishing

Click Submit and choose public.
2

Create a version

Add a name and description.
3

Publish

Publish the container.
GTM publish and version creation
For more information about publishing tags on GTM, please visit: GTM Tag Publishing
Last modified on March 31, 2026