All right. In the last video, we set up our proxy.
If you haven't seen that yet, uh, go back to the last video and
now we want to send data into it.
Um, apart from the URL that we have already there, we want to send
in data via Google Tag Manager.
So I've come up with a little bit of a tag template that you can install.
And yeah, let's set up that right now.
Okay.
For the second step, we need to set up our event tracking inside of
Google Tag Manager and for that we'll install an Active Campaign Event
Tracking template that I've built.
So it will be easy to set up.
So the first thing that I need you to do is in the GitHub repository
click on this Active Campaign event tracking.tpl and then click on RAW
and then just press Command S or Control S in order to download this
as the TPL file so this needs to be TPL, just going to put this into my
download folder and that should now be saved now in Google Tag Manager.
Uh, I have an account here.
This account is installed on the website.
We don't have any kind of tags or triggers in here so lets set this up from scratch.
I want you to go over to the templates and then click on new and then up
here, click on the three dots and import, then we will find our TPL file
and then we have it all loaded up.
So this is the code.
If you change anything, then it might not work anymore so, um, that might
be something that is on your own.
If you want to do this, but you can go ahead and then save this.
So this not inside of the community gallery, you need to install this
manually through the GitHub repository or through this TPL for because I
don't think it's the right fit for the community gallery as a Cloud Functions
is not really a standard way of doing this things, but my preferred way.
Okay.
Now, Active Campaign is installed as a tech template and we can
go ahead and install this.
Actually let's go ahead and click here on new as a tag, then tag configuration
and here we should find our Active Campaign tag template right here.
And now we have some different, um, things to fill out.
First of all, the Cloud Function.
Again, you can go over to your Cloud Function and find out the URL
by going into the edit mode here.
Here we have our URL.
Let's copy that.
Put that into Google Tag Manager up here.
So that should be it.
And then you need to choose an identification method, now, last
time we used the contact ID.
You can also use an email address, which I wouldn't recommend for PAI reasons
and you could also use the user hash that Google Tag that Active Campaign
has actually in the background as well.
So I'm just going to go with the contact ID since we are already used to this,
as we know the contact ID of this
uh, user is two and then you would need to fill out the
Active Campaign contact ID.
I'm going to do this manually.
Obviously this would be something that you would need to, um, build in, and
this is what we're going to do in step number three, then we have our events
event name again, I'm going to just use testing right here and then the value
um, this time we are sending this from GTM.
So let's put in GTM right here and try this out.
Just let's do it on all pages.
And again, we put in a name, Active Campaign, um, Event Tracking and
we're sending over a testing event.
So let's see if this actually works, we're going to go into the preview
mode and then go to our demo shop.
Uh, do we have it in here?
Yes, right here.
let's connect this and we are now connected so we should have our
event tracking should have fired with that ID exactly the same so in
Active Campaign we should see that there's a new event that came in.
Yep.
Here we go.
We are now sending events from GTM and this is obviously just
something for test reasons,
we have just put this on all pages trigger so it would trigger.
If I go to the next page, in the next page, obviously there is something
called side tracking that you could be using in order to do that, so I would
just go ahead and, and, um, disabled this here for our testing and maybe,
uh, attach a different trigger to it
so in our case, we can go ahead and let's quickly build a
click trigger for add to cart.
This will be our All Elements only on some clicks where the click text contains
add to cart, it's pretty straightforward but if you want to obviously fire
this on different other events, then you would be able to do so as well.
So, um, Yeah, go crazy if you want to fire this whenever we are going to
change the event name to click now be aware that this needs to actually be
inside of your site tracking as well,
so when we go on to tracking here, this needs to be white listed,
so we have a click in here.
If you send something into, it's not white listed, it will not
appear inside of Active Campaign.
So we will go with click here and the event name is click.
And then we can send in any data.
Let's go ahead and actually send in the Page URL
for example, click let's go with the Page URL so this will be dynamically
filled out by our variable.
So let's try this out preview here again.
Okay.
And we'll go ahead and see.
Okay, now we're going ahead and into product and click on, add to
cart and let's see on our click, our tag didn't fire probably
I have, um, done the click text wrong so it is the click
text needs to be add to cart.
Okay.
Let me just quickly change this around.
So it should be add to cart.
and I'm going to press add to cart again, this time hopefully on the click we have
our testing event and then inside of Tag Manager we need to have the right contact.
Yeah, you have here our click and this click happened on this page
because we have created it this way.
So that would be how you can install this with Google Tag Manager,
I'm just going to change around
this event so it's much clearer.
And in the next step we would now look back on our GitHub repository.
We need to have a way to identify the user.
Now, obviously, when we looked into Google Tag Manager we have, um, had the contact
ID manually number two so it will always be sent to the profile of the user, but
now we need or want to set something up
so it's dynamic and whatever user comes to our website, we will identify
him so we can send it to the right profile inside of Active Campaign.
So I'll show you how to set us up in the next video.