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 😉