ActiveCampaign Site Tracking

This Article Applies to

Automatically creates and configures your tracking script for ActiveCampaign

Automatically detects when your users are logged in, and tracks them

Automatically disables tracking when no trackable information is found

Site & Event Tracking

Site tracking

With site tracking you can place a small snippet of javascript on your site (similar to Google Analytics) and we will log/track all of your site traffic.  You can selectively include an email address as part of the javascript (on form completion pages, shopping carts, when users are logged in, etc..) and we will relate all of their past & future traffic on your site to that email address.


How to setup site tracking:

  1. Go to the “Settings” tab and click “Tracking” in the side menu
  2. Click “Enable” by the “Site Tracking” section
  3. Add your domain(s) to the domain white list
  4. Copy/paste the tracking code on to your web site
Example code that you paste on your site:

<script type=”text/javascript”>
var trackcmp_email = ‘email@domain.com‘;
var trackcmp = document.createElement(“script”);
trackcmp.async = true;
trackcmp.type = ‘text/javascript’;
trackcmp.src = ‘//trackcmp.net/visit?actid=279033&e=’+trackcmp_email +’&r=’+encodeURIComponent(document.referrer)+’&u=’+encodeURIComponent(window.location.href);
var trackcmp_s = document.getElementsByTagName(“script”);
if (trackcmp_s.length) {
trackcmp_s[0].parentNode.appendChild(trackcmp);
} else {
var trackcmp_h = document.getElementsByTagName(“head”);
trackcmp_h.length && trackcmp_h[0].appendChild(trackcmp);
}
</script>

How to use your site traffic data:

  • Automated series
  • Segments
  • Personalization
  • Conditional content

NOTE: We automatically track site visits as soon as you install the code on your site, activate site tracking from your account, and whitelist the tracked domains. In order for us to match the site visits, one of the following needs to happen.

  1. The contact would need to subscribe through an ActiveCampaign form
  2. The contact clicks a campaign link that takes them to a tracked page

 

Event tracking

With event tracking you can log events such as sign ups, orders, actions within your application, etc… With each event that you log you can specify the email address, an event name, and an event value.  The event name and value can be anything you want.  You can then use event data to help run automations, personalize campaigns, show conditional content, trigger campaigns, etc..

How to setup event tracking:

  1. Go to the “Settings” tab and click “Tracking” in the side menu
  2. Click “Enable” by the “Event Tracking” section
  3. Copy/paste the event tracking code on to your web site
  4. Be sure to update the event name and event data variables in the tracking code
Example code that you paste on your site:

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, “https://trackcmp.net/event”);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, array(
“actid” => 23033,
“key” => “c12973b078007927842301eff932e7d78b74b3e”,
“event” => “YOUR_EVENT“,
“eventdata” => “ANY_DATA“,
“visit” => json_encode(array(
// If you have an email address, assign it here.
“email” => “”,
)),
));

$result = curl_exec($curl);
if ($result !== false) {
$result = json_decode($result);
if ($result->success) {
echo ‘Success! ‘;
} else {
echo ‘Error! ‘;
}

echo $result->message;
} else {
echo ‘CURL failed to run: ‘, curl_error($curl);
}

How to use your site traffic data:

  • Automated series
  • Segments
  • Personalization
  • Conditional content

Related Posts:

9 ways to add more value to your membership site

Table of Contents

This Article Applies to

Related Posts

Logout Automation

This setting gives you the ability to define an automation that will be run when the user logs out. You can set Logout Automation from Memberium -> Settings -> Login

Read More »

Default Page Redirect

This text entry field specifies what page a user will be redirected to, by default, it is a login page. This setting supports the placeholder {{current.url}} which substitute in the current URL.

Read More »

Ready to See How You Can Automate Your Course or Membership With Memberium for ActiveCampaign?

Watch this quick demo video to see how Memberium works. Discover how thousands of successful business owners use Memberium to sell their membership programs and how you can too! If you’re ready to get started, you can check out our plans and pricing here…