How to Setup Site Tracking In ActiveCampaign

A common question I get from the ActiveCampaign community is how to properly setup site tracking and link it to a contact. I’ll show you how to do this properly in this post…

What Is Site Tracking

Every good marketing automation software will allow you to track visitors on your site and link it to people in your contact list.

This is really useful to see what pages your contacts are interested in, how active people are, and can also be used to trigger automations.

For example you could have an automation like this:

  • If someone goes to your first page of checkout you tag them with CHKOUT: Step 1
  • Wait for 2 hours and see if they still have the tag CHKOUT: Step 1
  • If so then send them an abandoned cart email sequence
  • If they complete the checkout you remove the tag so the abandoned cart sequence doesn’t get sent to them
  • (This works even better with event tracking)

Another example automation:

  • If some visits a page about a certain topic then tag them with that topic
  • Then send them a series of emails that gives them more information about the topic and sells them on your webinar (or other call to action).

The Problem With ActiveCampaign Site Tracking

The problem with the ActiveCampaign site tracking (and the missing step in their documentation) is how to link people on your site with people in your list.

If you can’t do this, then there is no way to tell people apart and the site tracking becomes pretty much useless.

lemons-and-limes

Now theoretically if you are using the ActiveCampaign forms to capture your leads then site tracking should work out of the box.

Problem is – the ActiveCampaign forms.. well.. they suck!

I don’t use them and don’t recommend you do either.

If you don’t use the ActiveCampaign forms then you have to wait for someone to click through from an email before site tracking will work.

However it is possible to use site tracking and immediately link it to a contact with 2 simple steps – regardless of what you are using for your optin forms.

Here is how to do it…

How To Setup ActiveCampaign Site Tracking In 2 Simple Steps

  1. Pass their email to your “thank you” page in the URL.
    Most form providers will have an option to do this out of the box. The end result you want is a thank you page URL like this: yoursite.com/thankyoupage/?email=theiremail%40domain.com
  2. Modify the AC site tracking code as per the code below.
    This first gets the contacts email if it has been provided in the URL.
    Then there is a modification of the standard AC code which checks to see if there is an email and if so it uses that.
    If there is no email it keeps this blank.
    After that is the standard site tracking code (don’t forget to update this with YOUR account ID).

There are other ways to achieve this and in my case I actually save the contacts email to a local cookie. I can then use this for both site tracking and event tracking.

Event tracking is really handy to track whatever events you may be interested in such as:

  • clicking on a certain link (or links)
  • mouse hovering over, well pretty much anything
  • focusing on form fields (i.e. an event of started form submission)
  • with a bit more effort percentage of videos watched
  • Really anything…

If you are interested in event tracking I wrote up a separate post about how to do event tracking in active campaign (including a free wordpress plugin).

  • Dave Roitner

    Nice! Thanks so much for this. Have been figuring out how to keep using my existing forms and still implement then site tracking without having them click on a link back to the site.

    I used Zapier to move the contact details over to AC.

    Your right that the AC forms suck. For a while there I thought I was the only one who wanted to integrate our own forms into AC. Can’t understand why they don’t have this feature. AC support basically said it can’t be done. Thanks for proving them wrong and taking the time to write this up and post it.

    • //functionalfunnels.com/ Todd Molloy

      No problem Dave. Glad you found it helpful!

  • Michèle Macnab

    We tried this but we’re using Instapage. Although we’re using the Instapage WordPress integration that means our Instapage pages are housed on the same domain, I suspect that the cookie data isn’t getting passed across to the rest of the WordPress site.
    Does this mean we need a way to push the Instapage cookie fields to WordPress? Should Active Campaign site tracking work then?

    • Michèle Macnab

      Haha, scratch that, my partner had cookies disabled XD So now we can see the site tracking in ActiveCampaign, but only the WordPress pages visited. If we visit Instapage pages on the site, it doesn’t track those.

      • //functionalfunnels.com Todd Molloy

        Try add this code to the scripts via instapage rather than via wordpress