MailChimp is a fantastic tool for emailing affiliates and informing them of upcoming promotions. In this tutorial we’re going to cover:

  1. Exporting affiliate data from your current affiliate system
  2. Importing affiliate data into MailChimp
  3. Creating a merge tag in MailChimp so any referral URL used inside the email can have the affiliate’s own ID appended

Exporting affiliate data from your affiliate system

The first thing you’ll need to do is export a list of your affiliates. Most affiliate systems should allow you to export a CSV file which contains useful information about the affiliate such as their email address and affiliate ID.

Once you have the exported file, save it to your computer so we can import it into MailChimp. AffiliateWP makes this easy by providing an export tool on the Affiliates → Tools page.

Exporting affiliate data as a CSV file in AffiliateWP
Exporting affiliate data as a CSV file in AffiliateWP

Importing affiliate data into MailChimp

Next we need to import the affiliate data into MailChimp so we can build a list of affiliates to email. If you happen to import an affiliate who already exists, you’ll get the option to update them.

  1. Log in to MailChimp and click lists to go to the main lists page
  2. Select the list that you’d like to import the affiliates into or click Create list to make a new one
  3. On your list, click Add subscribersImport subscribers

    Importing subscribers into your list
    Importing subscribers into your list
  4. On the Import subscribers page click Import from a CSV or TXT File

    Importing a CSV or TXT file
    Importing a CSV or TXT file
  5. Next to the Upload a file input field click Browse to select your CSV file you saved earlier, and then click Open

    Uploading a CSV file
    Uploading a CSV file
  6. Click Upload List
  7. Once you have successfully imported your CSV file you may be prompted to match the columns in the uploaded CSV file to the MailChimp list. If you have any unwanted columns you’ll also get the opportunity to skip them as shown in the screenshots below.
    Click the Save button on the column containing the Affiliate ID. Once you click save, it will then highlight the next column.
  8. Click the Save button on the column containing the Email Address
  9. Click the Skip button on any remaining columns that you don’t need

    Columns that aren't needed can be skipped
    Columns that aren’t needed can be skipped
  10. Once you have both the affiliate ID and email address columns saved click Complete Import
The imported list showing our new subscribers along with their affiliate ID.
The imported list showing our new subscribers along with their affiliate ID.

Hooray! You should now see a list of subscribers containing their Email Address and also an Affiliate ID column.

Creating a merge tag

As defined on the MailChimp website, “Merge tags allow you to dynamically add content to your email”.

The following steps will show you how you can create a merge tag for the Affiliate’s ID. This will allow you to add referral URLs inside the email and have the affiliate’s ID appended to the URLs.

  1. Click Settings and then List fields and *|MERGE|* tags

    Navigate to List fields and *|MERGE|* tags
    Navigate to List fields and *|MERGE|* tags
  2. Find the Affiliate ID Field Label and if it’s not already set, change it’s merge tag to something that makes more sense. Here I’ve used AFFID.
  3. Click Save Changes

Using the merge tag

Inside the MailChimp editor you can now use your new merge tag. You’ll first need to construct the URL, adding everything but the affiliate ID.

  1. Add the URL that you’d like your affiliates to promote, followed by the referral variable. Here are a couple of examples of what this URL might look like:


  2. Click Merge tags and then Affiliate ID

    Adding the merge tag
    Adding the merge tag
  3. The *|AFFID|* merge tag will now be inserted

    The inserted merge tag which will dynamically add the affiliate's ID
    The inserted merge tag which will dynamically add the affiliate’s ID
  4. That’s it! When your campaign is sent out to affiliates they will receive an email with their own unique affiliate ID added to the URL.


Andrew Munro

About the author: Andrew Munro co-founded AffiliateWP in early 2014. His trusty treadmill desk allows him to write code at an incredible 3 mph, making him the fastest developer around.


      1. Yes, that is the plugin I was referring to.

        I’m not sure if the MailChimp API would allow for this type of integration, but it is at least a thought.

  1. Thanks for the tutorial. I have two client sites that I’m building AWP into and both of them unfortunately use Aweber for their email marketing. So I don’t have an add-on to make this easier.
    Is there any plans to release one for Aweber?

    The above method could be easily adapted for Aweber, but manual process if obviously not ideal. Plus it would be great to be able to send an automatic welcome email to affiliates, which would only work if they were added at the point of sign up.

    (Am less concerned about passing through the ID, just being able to email them easily!)

    1. You’re welcome Simon! We don’t have any current plans to build an AWeber add-on but perhaps you could reach out to the developer who built both the MailChimp and GetResponse add-ons we have?

      Do you use Ninja Forms at all? We have a pro add-on being released very shortly which allows you to build your own affiliate registration form using Ninja Forms. You’ll then be able to use their AWeber extension to send affiliates to your mailing list.

      1. Thanks for the reply! Sorry yes I just realised the Mailchimp/GR addons are third party, so makes sense to enquire with the developer. Will do!
        But great to hear about the Ninja Forms add-on – that would be another great way round things. Thanks again.

Leave a Reply

Your email address will not be published. Required fields are marked *