This page is part of our wider Shopify guide — if you haven’t already, we recommend visiting our Shopify: Getting Started article.
Why Use a Landing Page?
A landing page is a great way to engage customers with your referral program without requiring a purchase to view the offer.
Later, this landing page will serve as a destination for promoting your referral scheme through emails, on-site messaging, social channels, and more.
Here’s an example from one of our clients:
Creating a Landing Page
To create your Shopify referral landing page:
- Log in to your Shopify admin panel and navigate to:
https://yoursite.myshopify.com/admin/pages - Create a new page. Give it a clear name like Referral Landing Page. You may choose to set it as Hidden initially.
- Open the code editor and paste in the code below. Be sure you're editing in HTML mode.
Below is a screenshot highlighting the HTML view button in Shopify:
Referral Code Embed Snippet
Copy and paste the following code into the HTML editor of your Shopify page:
<div id="mmWrapper"></div>
<script>
// Enter your Mention Me partner code here:
var partnerCode = "INSERT_PARTNERCODE";
var urlComponents = [
"https://tag.mention-me.com/api/v2/referreroffer/",
partnerCode
];
var queryComponents = [
["situation", "landingpage"],
// Locale
["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>
Updating the Variables
Before you publish, be sure to update the integration code with your specific values.
1. PartnerCode
Replace INSERT_PARTNERCODE with your actual Mention Me partner code. If you’re unsure of your code, please contact your Onboarding Project Manager.
2. Locale Settings
If your e-commerce store serves multiple regions or languages, you may wish to modify the following line in the script to better reflect your locale strategy.
// Locale
["locale", Shopify.locale + "_" + Shopify.country],
Learn more about setting up locales in our Shopify: Locales guide.