Shopify
Step 1: Log into your Shopify account and to go Online Store > Themes
Step 2: Click on the Actions button on the top right and choose Edit Code
Step 3: Under layout, select theme.liquid
Step 4: In ReferralHero go to your campaign dashboard > Installation instructions and copy your Tracking Code.
Step 5: Paste the ReferralHero Tracking Code in the theme.liquid file between the [head] and [/head] tag but just before the [/head] tag.
Note
Some themes will use the tag, {/head}, [/header], or other variations of [/head]. These will work in the same way.
Step 6: Save the changes. Your ReferralHero Tracking Code is now installed.
Step 7: Now go to the page where you want the widget to appear.
Step 8: In the editor, click on the top right icon Show HTML.
Step 9: In the text area, enter <div id="maitre-widget"></div>
Step 10: Save your changes and the embeddable widget will appear on the page.
Step 11: Please continue on if you are if you are setting up a campaign with a custom event, such as a purchase.

Custom Event

If you're setting up a ReferralHero campaign with a custom event, such as a purchase, you'll want to follow through with these additional steps. You would do this if you want a successful referral to count only after a purchase has taken place.
As an example, your ideal user journey would look similar to this:
  1. 1.
    User subscribes to ReferralHero campaign via ReferralHero Widget or other method
  2. 2.
    Subscriber shares referral link to friend
  3. 3.
    Friend visits website
  4. 4.
    Friend completes a purchase
  5. 5.
    Original referrer is rewarded for the friend referral
Step 1: In your Shopify account and to go Settings > Checkout
Step 2: Find Additional scripts > Order status page
Step 3: Add the two below scripts into the text area as shown:
Copy this script:
1
<script type="text/javascript">
2
window.RHConfig = {
3
callbacks: {
4
ready: function() {
5
RH.trackReferral('{{checkout.email}}');
6
}
7
}
8
}
9
</script>
Copied!
Note: This script will only capture the email address from the Shopify checkout page to the created ReferralHero subscriber profile. If you want to capture additional data points, such as Name, Conversion Value, etc you will need to reference this page and add additional Shopify Checkout Objects.
In your ReferralHero account copy the Tracking Code (your ReferralHero Tracking Code will look slightly different):
Paste the scripts into your Shopify text area as shown:
Step 4: You're done. Now, the referred friend and related relationship will not show in your ReferralHero subscriber list until a purchase takes place.
Last modified 2mo ago
Copy link
Contents
Custom Event