This is an advanced feature and requires working with our open API and knowledge of programming language.
Event Tracking is a flexible feature that helps you collect data on a wide variety of contact behavior. You can create an event for any activity on your website or app and assign it a value. As you begin to capture event data and send it to your ActiveCampaign account, you can use it to improve your marketing and sales processes as well as use it to trigger automations, create segment conditions, and personalize campaigns.
Event Tracking vs Site Tracking
Event Tracking is flexible and lets you track virtually any contact behavior that you define on your website. For example, you can track video views, button clicks, orders, log-ins, in-app behavior, and more. With Event Tracking, you'll need to create customized code for each event you'd like to track on your website.
Site Tracking is a type of Event Tracking. It simply tracks webpage visits made by contacts. With Site Tracking, we provide you with a snippet of code that you paste into every page of your site. If you only need to track page visits, we recommend this option. Learn more about Site Tracking.
How Event Tracking Works
Event Tracking is an advanced feature. You need to be familiar with a programming language to set it up on your website or app and you can use any programming language you prefer. If you do not know any programming languages, you can work with someone on your team who does, or you can hire an ActiveCampaign Certified Consultant to set it up for you.
An event is triggered by using POST to send data to http://trackcmp.net/event. This can be done in virtually any programming language.
In order to use Event Tracking, you'll need to:
- Turn on Event Tracking in your ActiveCampaign account.
- Use a programming language (of your choice) on your site to capture the following four data points: Who (contact's email address) performed the event (defined by you) consisting of a value (defined by you) and when the event happened.
- Use our open API and your Event Key to send us the event information.
When this information is sent, we'll match the email address of the contact who took the defined action and match it to the email address of a contact in your ActiveCampaign account. We'll then attribute that event to the contact.
If the event does not yet exist in your ActiveCampaign account, we'll display it on your "Website" > Site Tracking" page and it will be made available in the segment builder.
If a contact does not exist in your ActiveCampaign account, the contact record will not be created and the event will not be added.
How to turn on Event Tracking
- Click "Website" > Site Tracking."
- Go down to the "Event Tracking" section.
- Click the "Status" toggle to set it to the "On" position.
After you turn on Event Tracking, an Event Key will appear in the Event Key field.
You will need to pass us this key when you call the API in order to send us the event data you've captured on your site. To see the Event Key in the example code, click the "Event Tracking API" link provided on the "Website" > Site Tracking" page.
Events will be listed in this box as well as in the segment builder as contacts complete them.
Event Tracking example code
The code you use varies depending on the event you are tracking and other factors. You can generate an example code to use as a starting point. To generate an example code, click the "Event Tracking API" link located on the "Website" > Site Tracking" page:
A modal will open and provide:
- Your actid
- Event data
- Code example that could register an event in PHP
Event Tracking with the PHP API wrapper is one of many ways you can use to send event tracking data to your ActiveCampaign account. Once you've written the code on your site to define and capture events, you can use the wrapper to send the event data to us. Using an API wrapper makes sending event data to your account easier—wrappers handle the API connection and specific API calls as simple functions. This saves you time from having to create the API connection and calls from scratch.
Use Event Tracking with Lead Scoring
By using Event Tracking and Lead Scoring together, you can automatically track contact behaviors across your website, within your emails, and from other tools you have integrated with ActiveCampaign. To learn more, watch the video below.