Mailchimp
ReferralHero and Mailchimp can work together in a few ways:
  • Import existing subscribers from Mailchimp to ReferralHero
  • Use your own Mailchimp sign up form to collect new subscribers for your ReferralHero campaign
  • Sync ReferralHero with Mailchimp
  • Sync Mailchimp with ReferralHero

How to import subscribers from MailChimp

If you have existing contacts in your Mailchimp account and you want to import / subscribe them all to your ReferralHero campaign, you'll want to follows these instructions:
  1. 1.
    go to your campaign dashboard > Subscribers > Import and click on the tab MailChimp.
  2. 2.
    If you haven't connected your MailChimp account yet, please do it now by clicking on the link "Connect your MailChimp account".
  3. 3.
    Choose a MailChimp list from which you want to import subscribers. If you can't see a specific list (for example because you created it recently) click on the link "Update lists".
  4. 4.
    Specify a URL for the referral link. This is the URL that we will use to generate the referral link for your subscribers. For example, if you use http://mywebsite.com, the referral link will be 'http://mywebsite.com?mwr=123456'
  5. 5.
    Click on the button Import
We will import your subscribers into your ReferralHero campaign immediately. Depending on how many subscribers you are importing, it might take from a few minutes to several hours. We will send you an email when the import is finished.
NOTE: If you set up the custom fields in your MailChimp list as explained here, ReferralHero will populate them with the subscriber's values.

How to use a Mailchimp signup form

If you want to use a Mailchimp sign up form instead of the ReferralHero widget to collect subscribers to your referral campaign, you'll want to follow these instructions:

Part I: Creating a Mailchimp Form

  1. 1.
    Log in to your Mailchimp account
  2. 2.
    Create a new Signup Form with the following fields:
Field Label/Tag
Description
Visibility
Name (Required field)
Subscriber’s name
Visible
Email (Required Field)
Subscriber’s email address
Visible
MWR
Subscriber’s referrer’s referral code (if referred)
Hidden
Sub_ID
Subscriber’s id
Hidden
Ex_Field
Subscriber’s extra field value
Hidden*
Ex_Field_2
Subscriber’s second extra field value
Hidden*
Code
Subscriber’s unique referral code
Hidden
Ref_Link
Subscriber’s unique referral link
Hidden
Tot_Ref
Subscriber’s total number of referrals
Hidden
Source
Subscriber’s source. If empty value will be “None”
Hidden
LastRef
Timestamp of last referral
Hidden
*Ex_Field and Ex_Field_2 are commonly used to store additional user data such as address and phone number and in which case, field visibility should be set to ‘Visible’
3. Go to Signup Forms > Embedded Forms to generate HTML code to embed in your site to collect sign ups

Part II: Adding the HTML code to your website

  1. 1.
    Add the following two snippets of Javascript to the Mailchimp form HTML source code in the following places (your source code will look slightly different):
1
<input type="hidden" name="MWR" id="MWR" />
Copied!
1
<script type="text/javascript">// <![CDATA[
2
window.addEventListener("load", function(){
3
document.getElementById("MWR").value = RH.referrer;
4
});
5
// ]]></script>
Copied!
Mailchimp form source code:
2. Paste the HTML code into your website where you'd like the form to show.
3. Now you're ready to continue to the next section and sync new Mailchimp subscribers to Referralhero

Sync Mailchimp subscribers to ReferralHero

As new organic or referred subscribers, sign up via your Mailchimp form, you need to send those subscribers to ReferralHero so that a new subscriber record, with correct referral relationship if any, can be accurately created. To do this automatically, you will need a Zapier account. If you are just looking to do a one time import of your Mailchimp list, follow these instructions instead.
  1. 1.
    Log in to Zapier
  2. 2.
    Create a new Zap
  3. 3.
    Search for Mailchimp as the Trigger App
  4. 4.
    The Trigger Event is ‘New Subscriber Triggers when a new subscriber is added to an audience’
5. Connect your Mailchimp account
6. Set up the trigger by choosing an audience
7. Click ‘Continue’ to test the trigger
8. Search for ReferralHero as the Action App
9. The Action Event is ‘Add Subscriber Adds a new subscriber to a list’
10. Connect to your ReferralHero account by entering the API Key
11. In the Set Up Action, the following five fields are mandatory:
  • Campaign: your ReferralHero campaign
  • Email address: Subscriber’s email
  • Referral URL: your default referral link address
  • Full name: Subscriber’s name
  • Referrer: MWR
  • *Include Ex_Field and Ex_Field_2 if they are used to collect additional data during user sign up
12. Then Test & Continue
13. Turn on Zap
14. Now you're ready continue to the next section and sync ReferralHero subscribers with Mailchimp with our native integration.
Turning on the native Mailchimp integration in ReferralHero will automatically sync subscriber’s additional unique referral data such as sub_id, unique referral code, etc to Mailchimp and populate the custom fields. Follow the instructions below to connect your Mailchimp account and set up your custom fields in Mailchimp.

Sync ReferralHero subscribers to Mailchimp

ReferralHero allows you to automatically sync your ReferralHero subscribers with a MailChimp list of your choice.
To connect your MailChimp account, go to your campaign dashboard > Edit Campaign > Integrations > MailChimp
After you connect your account, choose a MailChimp list from the drop-down menu and save the changes.
If you create or remove lists in your MailChimp account and need to update the lists on ReferralHero, just click on the "Update lists" link.
Please keep reading below about Mailchimp Custom Fields, as you will likely want to complete this step as well.

Custom Fields

When a person signs up we send a bunch of extra data to MailChimp that is stored in your list's custom fields. (Refer to the official MailChimp Merge Tags Documentation for more info).
The Custom Fields we send are:
CUSTOM FIELD
Description
SUB_ID
Subscriber's id
NAME
Subscriber's name
EX_FIELD
Subscriber's extra field value
EX_FIELD_2
Subscriber's second extra field value
CODE
Subscriber's unique referral code
REF_LINK
Subscriber's unique referral link
TOT_REF
Subscriber's total number of referrals
SOURCE
Subscriber's source. If empty value will be "None"
LASTREF
Timestamp of last referral
In order to use these custom fields in your MailChimp emails, you must manually create them on your list.
To add and remove custom fields in your MailChimp list go to Mailchimp.com, then go to Audiences > Settings > List fields and |MERGE| tags.
Your page should look like this:
Please notice that these custom fields are optional; you don't have to add them for MailChimp to work. However, if you have other custom fields that are required in your list, the sync will fail. Make sure you have NO required custom fields in your list.
ReferralHero will automatically update these custom fields when things change (eg: when a subscriber refers a new person, their TOT_REF value changes).

How to use merge tags in MailChimp

Though a guide on MailChimp merge tags is beyond the scope of this article (and we recommend you to read Mailchimp's official guide), we have created an example of how to use the custom fields ReferralHero sends to your list for your newsletters.
Assuming you are importing all ReferralHero custom fields as described above, let's say you want to send out a newsletter where you remind your subscribers about your referral program and to keep sharing their code.
The body of your email could then look like this:
And when you send the email, the custom fields will be replaced with the correct value.
Last modified 5mo ago