Skip to main content

Embedding a Campaign on Your Store

Learn how to embed a referral campaign on your store using the campaign display code.

Written by Kris - Mage Loyalty
Updated over 3 weeks ago

💳 Referrals campaigns are available on the Growth and Enterprise plans

ℹ️ Note

Every referral campaign has a unique 6-digit Display Code. Use the correct code in your Shopify theme block to display the intended campaign.


Get the Display Code

  1. Open the campaign editor in Mage Loyalty.

  2. On the General tab, scroll to the Embed Code section at the bottom.

  3. Note the Display Code - a 6-digit number, e.g. 272355.

✅ Tip

You can also get the Display Code quickly from the Referral Campaigns list. Click Manage next to your campaign and select Copy Embed Code.


Add the Campaign Block in Your Theme

  1. From your Shopify admin, go to Online Store > Themes and click Customise on your live theme.

  2. Navigate to the page where you want the campaign to appear, typically your referral or loyalty landing page.

  3. Add a new section or block and select Mage Referral Campaign from the list.

  4. In the Campaign Display Code field, enter the 6-digit code from Step 1.

  5. Click Save in the theme editor.

ℹ️ Note

You can add the Mage Referral Campaign block to multiple pages, each with a different Display Code, so each page shows a different campaign.


Enable the Campaign

  1. Return to the campaign editor in Mage Loyalty.

  2. On the General tab, toggle Campaign Status on.

  3. Click Save.


Common Mistakes to Avoid

⚠️ Common Mistake

Enabling the Campaign Status before adding the block to your theme. The campaign will be active but invisible to customers. Complete the theme embed step first.

⚠️ Common Mistake

Entering the wrong Display Code in the theme editor. Double check the 6-digit code matches the campaign you want to show on that page.


Troubleshooting

The campaign is not showing on my store

  • Confirm the Mage Referral Campaign block has been added to the correct page in your theme editor and saved.

  • Check that Campaign Status is toggled on in the campaign editor.

  • Test in an incognito window to rule out browser caching.

Friends are not seeing the claim form when they click the referral link

  • Enable site-wide popup in the General tab, this ensures the claim form appears regardless of which page the friend lands on.

  • Confirm the Referrals Landing URL in Referrals > Settings points to a published page on your store.


Related Articles


🗨️ Still need help or can’t find the answers you’re looking for? Reach out to the Mage Loyalty team through our live chat support.

Did this answer your question?