Let's set up Active Campaign event tracking with the help of Google Tag
Manager and Google Cloud Functions.
All and more, coming up
Hey there Measure geeks, Julian here back with another video on
Active Campaign event tracking.
Now this is a little bit of an update because our previous technique with
App Script is kind of outdated but at the same time, I found a better
method with Google Cloud Functions.
So let me explain, now you might remember that Active Campaign event tracking
it's not as easy as just sending over data from Google Tag Manager
into Active Campaign, you actually need to have a proxy so your Active
Campaign, API keys don't get exposed.
Previously I have done this with Google App Script, which has become
a little bit of a hassle to set up.
And, um, I also didn't want to use the Zapier because Zapier is not really
built for tracking, and if you send
thousands and thousands of requests, it might get really really expensive,
really fast, but lately I've been really impressed with Google Cloud Functions.
That's a product in the Google Cloud platform that we can use and really
easily set up and then use as our proxy to send data from Google Tag Manager to the
cloud functions and from there to Active Campaign to trigger our event tracking
and Google Cloud Functions is really cost-effective, but also really reliable
because we get, um, logging as well
so we can see what is going on under the hood, but don't get
me wrong to set this all up.
We need to put a few pieces in place in order to make this all work.
So that's why I have split up this video into four parts where we're
going to set us up step by step.
In this first video, I'm going to give you a little bit of an overview
so you know what we are trying to accomplish and how it
would look like at the end.
Then, in the second part, we are going to set up our Cloud Function.
This will be our API proxy that we can send data into and connected
with our Active Campaign Account.
We'll try this out so this connection at least works already.
In the third video, we are going to then set up a custom tag template that I've
developed for our Active Campaign API, which lets us send data then to our Cloud
Function and from there into our Active Campaign API, without in place, we kind
of have everything in place in order to make this tracking work, but to make it
really effective, we would need to know where to send that data to, and we need to
identify the user that actually comes to the website and what action he has taken.
So in the fourth video, we're then going to use some techniques with
cookies to actually identify the user once he comes from an email to
our website and then re identify him once he takes the action to send our
data over to the Active Campaign API.
So it's quite a few steps here and was also quite a few, uh, video tries
to actually make this video work
so if you appreciate it, please give us a thumbs up on this video
so we can spread the love and get some algorithm love as well.
Yeah.
Oh, we've got lots to cover.
So let's dive in.
Right to start us off, let's get an overview of what we're
trying to accomplish here.
So in essence, we want to send in event tracking information from our website
to a specific Active Campaign contact.
So this would be the information that we would then see, for example,
if the user has clicked something.
Now, installing event tracking is not as trivial as just installing a
little tag on your page because the event tracking information has some
specifics that would only allow you to send that information over when
you actually have the user identified and also are sending over a key.
That key should remain secret
and therefore we are building in a mechanism to first send our data from
Google Tag Manager to a Cloud Function and this is what we're going to set up
on the Google Cloud Platform and this Cloud Function will then relay our data
to Active Campaign and find the right user profile to send that information to.
And in the end, we will be able to create a Google Tag Manager deployment
by simply knowing our cloud function URL, putting in the user identification method
and then, choosing which event we want to send over and what values we want to send
over and then also using our triggers, fire this on any kind of event that
we have to find in Google Tag Manager.
Now the big part in the tracking deployment place the identification
so, how do we identify the user when he comes to our website and
then send it to the right profile that is in its Active Campaign,
the easiest way of doing so is to
attach a query string in an email that we sent out to the user.
So for example, here we have an email that when the use it clicks the link, he has
in the URL an identifier, in this case number one, which would be his contact
record, to identify this user uniquely to where we want to send the information to.
In order to retain that information,
because when we click here on the next URL it will be gone, in order to
retain that information we are also going to build in a way to set a cookie
so this information is remembered when he comes from that email.
So in the end, it should look a little bit like this.
Let's go ahead and go into our preview mode here.
You come to the website and we get a, or become normally
through a link to the website.
We come to a URL that has an Active Campaign ID in the URL
itself that identifies us uniquely.
So number three it would be in this case and we can then even if you go
to the next page, fire our event here.
So in our case that was the add to cart event, and that then sends it over to the
right profile, which is saved in a cookie
so we should be able to then see that information under
our third contact record.
Let me just find it right here and here we can see that the click was
registered with the information that we send over just a few seconds ago.
So in order to set us all up, we have a few things that we need to take care of.
First of all, we need to set up a Cloud Function.
That is our relay.
That's our proxy.
Where we are going to send the data to, we need to then set up an Active
Campaign event tracking so this will be done in Google Tag Manager and I have
created a custom tag template for that.
And then last but not least, we need to
set up the way to identify the user with that email and also send that
information to the right profile and also remember it through the cookie.
So this is what we're going to set up in the next minutes.