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

# Checkout & Sidecart Referee Tag

> Manually add the Mention Me Referee 'Been referred by a friend?' link to your Shopify cart, sidecart, or checkout.liquid.

The Referee Tag displays a **"Been referred by a friend?"** link, enabling customers to identify who referred them.

<Tip>The Referee experience can also be added to your Shopify Checkout using the [Checkout Extensibility App](/knowledge/shopify/app-installation) -- this requires **Shopify Plus**. This manual approach is for adding the tag to Cart, Basket, Side Cart, or `checkout.liquid` pages (and `checkout.liquid` itself is Shopify Plus only).</Tip>

## Cart / Basket Page

Add a `<div>` where the link should appear, then add the JavaScript snippet after it. Locate and edit your cart template (e.g., **cart.liquid**).

<Steps>
  <Step title="Add the Div">
    ```html theme={null}
    <div id="mmWrappercart"></div>
    ```
  </Step>

  <Step title="Add the Script">
    ```html theme={null}
    <script>
    var partnerCode = "INSERT_PARTNERCODE";
    var situation = "cart";

    var urlComponents = ["https://tag.mention-me.com/api/v2/refereefind/", partnerCode];

    var queryComponents = [
      ["situation", situation],
      ["locale", Shopify.locale + "_" + Shopify.country]
    ];

    queryComponents = queryComponents.map(qc => qc[0] + "=" + encodeURIComponent(qc[1]));

    var url = urlComponents.join("") + "?" + queryComponents.join("&");
    var script = document.createElement("script");
    script.src = url;
    document.getElementsByTagName("head")[0].appendChild(script);
    </script>
    ```

    Replace `INSERT_PARTNERCODE` with your actual Mention Me PartnerCode. For locale configuration, see [Shopify: Locales](/knowledge/shopify/locales).
  </Step>
</Steps>

## Sidecart / Popout Cart

If using a slide-out or pop-up cart (e.g., **sidecart.liquid**):

<Frame caption="Sidecart with the 'Been referred by a friend?' link">
  <img src="https://mintcdn.com/mentionme/GjiDi6ZwHP27Pu0w/images/knowledge/shopify/11432823940765.png?fit=max&auto=format&n=GjiDi6ZwHP27Pu0w&q=85&s=28917339be0584ffc1f119c12cbc76e8" alt="Shopify sidecart with &#x22;Been referred by a friend?&#x22; link" width="4136" height="2470" data-path="images/knowledge/shopify/11432823940765.png" />
</Frame>

```html theme={null}
<script>
var partnerCode = "INSERT_PARTNERCODE";
var situation = 'sidecart';
var implementation = 'link';

if (window.MentionMeFiredTags && window.MentionMeFiredTags[implementation + situation]) {
  delete window.MentionMeFiredTags[implementation + situation];
}

var urlComponents = ["https://tag.mention-me.com/api/v2/refereefind/", partnerCode];
var queryComponents = [
  ["situation", situation],
  ["locale", Shopify.locale + "_" + Shopify.country]
];

queryComponents = queryComponents.map(qc => qc[0] + "=" + encodeURIComponent(qc[1]));

var url = urlComponents.join("") + "?" + queryComponents.join("&");
var script = document.createElement("script");
script.src = url;
document.getElementsByTagName("head")[0].appendChild(script);
</script>
```

## Checkout (Shopify Plus Only)

Shopify Plus merchants can modify `checkout.liquid`:

<Frame caption="The checkout.liquid editor in the Shopify Plus theme code editor.">
  <img src="https://mintcdn.com/mentionme/GjiDi6ZwHP27Pu0w/images/knowledge/shopify/11432868429085.png?fit=max&auto=format&n=GjiDi6ZwHP27Pu0w&q=85&s=37100967ea74918df37e7a9ca15055e6" alt="Shopify Plus checkout.liquid editor" width="2624" height="1116" data-path="images/knowledge/shopify/11432868429085.png" />
</Frame>

```html theme={null}
<script>
var partnerCode = "INSERT_PARTNERCODE";
var situation = "checkout";

var urlComponents = ["https://tag.mention-me.com/api/v2/refereefind/", partnerCode];
var queryComponents = [
  ["situation", situation],
  ["locale", Shopify.locale + "_" + Shopify.country]
];

queryComponents = queryComponents.map(qc => qc[0] + "=" + encodeURIComponent(qc[1]));

var url = urlComponents.join("") + "?" + queryComponents.join("&");
var script = document.createElement("script");
script.src = url;
document.getElementsByTagName("head")[0].appendChild(script);
</script>
```

Planning a move to Shopify Checkout Extensions from `checkout.liquid`? Review the [checkout extensibility guide](/knowledge/shopify/checkout-extensibility).
