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.

Features

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:
yoursite.com/?email=%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:

ac_events('event','value').

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”]
<script>
window._wq = window._wq || [];

wistiaEmbed.bind(“secondchange”, function (s) {
if(s === 60) {
ac_events(‘Watched 60 seconds!’, ‘What a guy’);
}
});
</script>
[/code]

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.

LICENSE
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: ,

Changelog

1.1.7.1

Renamed trackcmp_email with wp2ac_email

1.1.7

Fixes for wp2ac_email cookie

1.1.6.1

Fixes php warnings

1.1.6

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

1.1.5

Added an option not to show tracking code

1.1.4

Fixed "Cannot modify header information" issue.

1.1.3

Fixed issue with tracking before email capture.

1.1.2

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

1.1.1

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

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