> ## 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.

# Integrating Mention Me Tags into Global-e Checkout

> How to add Mention Me referrer and referee tags into Global-e checkouts, including Shopify + Global-e setups.

## How Does Global-e Integrate with Websites?

Using Global-e as your checkout provider means your brand hosts specific pages (such as checkout or order confirmation) that contain a Global-e iframe. You cannot modify this iframe or use unsupported variables, but you can hook into Global-e functionality using their API to integrate Mention Me.

Only the Referrer tag is added for your Global-e checkout. The referee tag should be added directly to your cart or basket page.

## Implementing the Referrer Tag

This tag collects customer information and serves referral offers post-purchase.

**1. Add the Tag**

Paste the following script on the page containing your Global-e iframe:

```html theme={null}
<script type="text/javascript">
var glegem = glegem || function() { (window["glegem"].q = window["glegem"].q || []).push(arguments); };

glegem("OnCheckoutStepLoaded", checkoutHandlerMentionMe);

function checkoutHandlerMentionMe(data) {
  if (data.StepId === "undefined" || data.StepId !== data.Steps.CONFIRMATION) return;
  if (data.IsSuccess !== true || data.IsPageReload === true) return;

  var script = document.createElement("script");
  var url = "https://tag.mention-me.com/api/v2/referreroffer/<PARTNER-CODE>?locale=<Locale>&situation=postpurchaseglobale";
  url += "&email=" + encodeURIComponent(data.details.customerEmail);
  url += "&fullname=" + encodeURIComponent(data.details.customerName);
  url += "&order_number=" + encodeURIComponent(data.details.OrderReference);
  url += "&order_total=" + encodeURIComponent(data.details.totalPriceExclVAT);
  url += "&order_currency=" + encodeURIComponent(data.details.customerCurrency);

  script.src = url;
  document.head.appendChild(script);
}
</script>
```

**2. Add Partner Code and Locale**

* Replace `<PARTNER-CODE>` with your Mention Me Partner Code (ask your Client Manager).
* Set the `locale`:
  * Hardcode a value (e.g. `en_GB`), or
  * Dynamically set using Global-e's data layer.
  * See the `locale` parameter on the [Referrer tag](https://docs.mention-me.com/developer-docs/integration/entry-points/referrer.md).

**3. Update Demo to Live URL**

* Use `tag-demo.mention-me.com` when testing.
* Switch to `tag.mention-me.com` for live use.

The live tag URL is disabled by default. Activate it via your Client Manager before customer-facing use. You can preview functionality using the Debug Tool.

## Additional Help

Required Mention Me variables: [Mention Me Referrer Parameters](https://docs.mention-me.com/developer-docs/integration/entry-points/referrer.md#mandatory-data-parameters)

Global-e variables: [Full Global-e variable list](https://web.global-e.com/merchant/clientapi#ganaadd)

### Referrer Tag in Global-e + Shopify

If using Shopify with Global-e, locate your `globale-tracking.liquid` snippet. It should include the following inside the `OnCheckoutStepLoaded` callback:

```javascript theme={null}
var script = document.createElement("script");
var url = "https://tag.mention-me.com/api/v2/referreroffer/<PARTNER-CODE>?locale=<Locale>&situation=postpurchaseglobale";
url += "&email=" + encodeURIComponent(data.details.customerEmail);
url += "&fullname=" + encodeURIComponent(data.details.customerName);
url += "&order_number=" + encodeURIComponent(data.details.OrderReference);
url += "&order_total=" + encodeURIComponent(data.details.totalPriceExclVAT);
url += "&order_currency=" + encodeURIComponent(data.details.customerCurrency);

script.src = url;
document.head.appendChild(script);
```

Ensure you:

* Only run the tag when `data.StepId == data.Steps.CONFIRMATION` and `data.IsSuccess` is true.
* Include your Partner Code and a valid `locale`.

![Shopify globale-tracking.liquid snippet with Mention Me referrer tag](https://mintcdn.com/mentionme/V2LNKGCh7ROBia07/images/knowledge/tags/360021067537.png?fit=max\&auto=format\&n=V2LNKGCh7ROBia07\&q=85\&s=e6c8e9db4bfde3d702d8d4422b3dea5b)

The globale-tracking.liquid snippet with the Mention Me referrer tag added.

Include this in **theme.liquid** to load the Global-e script at checkout:

```liquid theme={null}
{% include "globale-tracking.liquid" %}
```

This should go inside the `<head>` tag in your layout.

![Shopify theme.liquid include for globale-tracking snippet](https://mintcdn.com/mentionme/V2LNKGCh7ROBia07/images/knowledge/tags/9433911146269.png?fit=max\&auto=format\&n=V2LNKGCh7ROBia07\&q=85\&s=830e9d60ea4566ce3f64ccb3519d8147)

The theme.liquid include for the globale-tracking snippet.

### Implementing the Referee Tag

Add the **referee tag** outside of the Global-e checkout (such as on the cart or side cart) so users can enter who referred them.

The referee tag cannot be used within the Global-e checkout environmentdirectly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.