Additional menu

Get MemberPress today! Start getting paid for the content you create! Get MemberPress Now
  1. Home
  2. Knowledge Base
  3. Add-ons
  4. Marketing
  5. ActiveCampaign
  6. Installation & Configuration of our ActiveCampaign Addon (Lists Version)

Installation & Configuration of our ActiveCampaign Addon (Lists Version)

« Configuring the Marketing Tab

There are two versions of ActiveCampaign integration: Lists Version and Tags Version. They cannot be used together. This document covers the Lists Version of the ActiveCampaign integration for MemberPress. Click Here for the Tags Version documentation.

This add-on is included with your purchase of the Plus or Pro edition of MemberPress.

Step 1 – Install the ActiveCampaign Add-on

In your WordPress dashboard, head to MemberPress -> Add-ons, and click to install the ActiveCampaign (Lists Version) add-on. Once it's installed, it will be automatically activated. You'll then see the ActiveCampaign integration available in the “Marketing” tab of the MemberPress Settings page.

Installing the ActiveCampaign Add-on inside MemberPress

Step 2 – Get the ActiveCampaign Account ID

Login to ActiveCampaign.com to get your Account ID (it will look something like1234567890123). Then paste it into the ActiveCampaign Account field shown in the image below.

Note: If you input the Account ID, and MemberPress does not populate your ActiveCampaign List, it may be that you have a newer ActiveCampaign account. In this case, the ID may be your username. Your username should be the bold part of the URL you use to access ActiveCampaign (http://username.activehosted.com/admin/).

Logging into ActiveCampaign

Enter the “Account name” value into the ActiveCampaign Account field.

Connecting ActiveCampaign Account with MemberPress

Step 3 – Get the ActiveCampaign API Key

Login to ActiveCampaign.com, click on your profile to expand the menu list and click on Settings.

ActiveCampaign Settings

Then click on the Developer option to find your API Key.

Developer API Key ActiveCampaign

Step 4 – Paste the ActiveCampaign API Key in MemberPress

Copy The API Key from Step 2 into the ActiveCampaign API Key field, as shown below.

Connecting ActiveCampaign to MemberPress

Step 5 – Select Your ActiveCampaign List

Once MemberPress has established a connection, select your ActiveCampaign List from the drop-down option. All users (paid or not) will be added to this list when they sign up.

Selecitng ActiveCampaign List

Step 6 – Set Up Per-Membership Lists (Optional, but STRONGLY recommended)

The Per-Membership lists allow you to automatically segment your members into different lists for marketing purposes.

Once ActiveCampaign is enabled, a new option will appear under the “Advanced” tab of the Membership Options on the membership edit pages. This option allows you to specify a list to which only members who purchase that specific membership will be added. Members will be automatically added to or removed from this list depending on their current subscription status for that membership. This list must be different from the Global list you have specified in the Options AND should be different from other Per-Membership lists.

To enable and set up your Per-Membership lists:

  1. Go to MemberPress -> Membership tab -> and click edit on your membership
  2. Go to Membership Options -> Advanced tab -> and click the checkbox for the “Active Campaign list for this Product” option. With that checked, you will be able to select a list from a drop-down of lists in your ActiveCampaign account. 

And you're done!

Now just configure MemberPress to use the correct campaign(s) as described on our Marketing page, and you're all set!

How to Send Custom Fields to ActiveCampaign

By default, MemberPress sends a user's email, first and last name, and updates global merge, and per-membership tags to ActiveCampaign. If you'd like to also send custom fields that you create in the MemberPress → Settings → Fields tab, you'll need to follow these steps:

  1. Go to WordPress Dashboard → MemberPress → Settings → Fields tab and create a custom field as explained in the Creating Custom Fields section of this article (or just copy the slug of a custom field). In the example below, the slug is mepr_company_name.

NOTE: This will work only with the custom field of “Text” type, so you can't use it with dropdowns, multi-select, or any other field types.

  • Log into your ActiveCampaign account and click the Lists icon on the left → Manage Fields → Contacts tab.
  • Click the Add Field button at the top, and you should see the modal window where you can add your custom field to the ActiveCampaign list. In this example, we've inserted the Company field:

    NOTE: Make sure that the Field Type of this field is “Text Input”.

  • Once the field is added, you'll need to copy the value in the Personalization Tag column:

  • Go back to your WordPress Dashboard, and insert the code below at the end of your theme's functions.php file. Alternatively, you can install the WPCode plugin and add the code there (please check this article for details: How to add custom code snippets in WPCode).

add_filter('mepr-activecampaign-add-subscriber-args', function($args, $contact) {
   if(isset($_POST['mepr_company_name'])) {
     $args['field[%COMPANY%,0]'] = sanitize_text_field($_POST['mepr_company_name']);
   }
   return $args;
}, 10, 2);  

As you can see above, we've copied the personalized tag: %COMPANY% from ActiveCampaign and inserted it in the code.

When a user signs up for a membership, MemberPress will capture the value entered into the custom field and send it to ActiveCampaign. You'll see this value next to the new contact in the Contacts table of your ActiveCampaign account.

Send Custom Fields to ActiveCampaign

That's it. You can create as many custom fields as you'd like. Just duplicate lines 2-4 in the code above, replace the slug from MemberPress: mepr_company_name, and personalize the tag: %COMPANY%.

Sending a Phone Number

If you'd like to send a phone number to ActiveCampaign, just use the default phone field provided by ActiveCampaign. Create a custom field in MemberPress, and insert the code below (you do not need to create a custom field on the ActiveCampaign side):

add_filter('mepr-activecampaign-add-subscriber-args', function($args, $contact) {
  if(isset($_POST['mepr_phone'])) {
    $args['phone'] = sanitize_text_field($_POST['mepr_phone']);
  }
  return $args;
}, 10, 2);

You can use the same steps to send address fields to ActiveCampaign. The slugs for address fields are:
–  mepr-address-one
–  mepr-address-city
–  mepr-address-country
–  mepr-address-state
–  mepr-address-zip

I'm Confused. Help!

Shoot us an email from our support page if you need any further assistance with this integration.

Was this article helpful?

Related Articles

computer girl

Get MemberPress today!

Start getting paid for the content you create.