WP ActiveCampaign API

The WP ActiveCampaign API plugin adds some basic ActiveCampaign functions to your WordPress website and serves as the “base plugin” for our other plugins.


Event Tracking

The WP ActiveCampaign API plugin simplifies event tracking. Just add your:

  • ActiveCampaign URL
  • API Key
  • Event Key
  • Event ID

In the settings pages and you’ll be tracking page visits and events right away.

Identifying Users

In order to associate page visits and events with contacts in ActiveCampaign as soon as possible simply include the email parameter in links to your website or on thank you pages.

In the case of a visit by email:

Or you can pass it immediately upon subscription to your thank you page yoursite.com/thank-you/?email=%EMAIL%

I do both so that I can make sure I’m tracking users.

Once you do this the plugin will create a cookie for that visitor and that cookie can be used later by our other plugins (or by yours!) for a variety of things.

Creating Events

We wanted to make tracking events on a page really easy so we added this function to the WP2AC plugin:


This makes adding events to link or button clicks or anywhere else that you can use javascript really easy.

For example if you wanted to track an event when someone clicks on a link

[code autolinks=”false” lang=”js”]onclick=”ac_events(‘Event’,’Value’);”[/code]

You can also use this in other places like to track video actions which is something we do with Wistia in the following example.

In this example we fire the event “Watched 60 Seconds!” with the value “What a guy” when the user has watched 60 seconds of a video.

[code lang=”js”]
window._wq = window._wq || [];

wistiaEmbed.bind(“secondchange”, function (s) {
if(s === 60) {
ac_events(‘Watched 60 seconds!’, ‘What a guy’);

Anywhere you can use Javascript you can use “ac_events();”

Other Functions

The WordPress to ActiveCampaign API plugin serves as a “base plugin” for some of our other plugins. Everything that we develop is built for and tested in our own production environment for our primary business.

Right now this plugin is free. This plugin is distributed without warranty. You may not hold us liable under any circumstances. You may use this commercially or otherwise. You may alter, change, update, adapt the code for any individual use. You may not sell, resell, or distribute it in any way. We are not responsible for support or updates – although we may provide them anyway 😉

Download Details

Download Category:
Download Tags: ,


Renamed trackcmp_email with wp2ac_email


Fixes for wp2ac_email cookie

Fixes php warnings


  • Updated the cookie name
  • Set "remove tracking" feature to only remove activecampaign tracking (added back the cookie)
  • Updated menu label


Added an option not to show tracking code


Fixed "Cannot modify header information" issue.


Fixed issue with tracking before email capture.


Changed the way we set cookies to solve the h'headers sent' error that some users were getting.


Fixed issue where users in certain environments, especially PHP 7, were having issues connecting to their ActiveCampaign API endpoints

Fixed a permissions issue that was preventing non-admin users from accessing wp-admin.