- In this video we're gonna find out how we can do
conversion tracking with the help of Google Tag Manager
and send that information onto our Facebook pixel.
All the more, coming up right after this.
(bouncy, bass thumping beat)
Hey there and welcome back to another video
of MeasureSchool.com, teaching you the digital way
of digital marketing.
My name is Julian and in this series on
Facebook pixel tracking,
we have already discovered how to set up our
Facebook base tracking pixel, send in page views and events,
and now we need to take care of
the most important interaction that a user can take
on your website, which is commonly known as a conversion.
Now, that might be a page that your user should visit
or a certain interaction that he should take,
but there's actually more information that we can send over
to Facebook, like the value of the conversion.
So we can optimize our ad campaigns towards that
and then later see that in our ads interface.
So it's crucial that we set up conversion tracking
and purchase tracking correctly on our website
and now I'm gonna show you how to do this
with the help of google tag measure, so lets dive in.
Welcome back to our demoshop,
in our last video we have already installed
our Facebook base pixel, which you need to have installed
in order for the other interactions to be picked up.
I re-installed the pageview event
and the add to cart event on button clicks off
the add to cart button.
Now, one thing that is missing,
which is very important for Facebook ads,
is actually the purchase tracking
so if you go to setup,
we will go with our menu installation right here.
We have already installed this Facebook base pixel code
on our page and if you go to continue,
we have our custom events.
Now, we already talked about our add to cart event,
what I wanna go over is the purchase event.
Now for the purchase event,
you simply also need to deploy this tracking code,
but what will make your data much better
is if you have a conversion value for example 99 dollars,
and currency, which is usually your not changing,
but could be dynamic as well. USD in here,
so the code gets a little bit longer,
now obviously, not all of our purchases should be
marked as 99 dollars. You would need to dynamically
insert this with the help of google tag manager.
So just to give you an example,
lets go back to our demoshop and buy a product,
so in any online store,
you would go and land on an order received page,
or a thank you page, where you would normally
see how much you have spent in your order.
Now this is obviously the amount that
we want to send over to Facebook and
dynamically fill into this event that we sent to Facebook.
How can we get the amount into
Google Tag Manager dynamically?
Well there are different methods and
we have discussed them in a video about conversion values
which you can check out in the cloud or
in the description below.
The most robust way is to build a custom data layout.
Now since I'm here on a (mumbles) store,
I've installed a plug-in by Thomas Geiger,
which is the Google Tag Manager for Word Press Plug-in.
Which will fill the data layer for you automatically
if you are on a website. So in order to see the data layer,
and where the information actually is,
we need to enter our preview in the work mode.
So lets do that first
and I will need to go through another conversion here.
And once I'm back on my thank you page,
I can look into my data layer,
and see how it was filled with values.
So in our case, we have this huge data layer push,
which is the GMT4wp order completed EEC
and as we can see, we have a transaction total in here,
which resembles the total amount that was bought by the user
You also have a transaction currency in here,
which you could also use if
we had different currencies in our store,
in our case, that doesn't really change
so I won't pull this from the data layer,
I'm just gonna try to pull the
transaction total from the data layer.
To do this, I will build a variable,
now variables are like place holders,
so you can build them dynamically to pull them from
places like the data layer.
I will choose as the variable type, a data layer variable
and this will allow me to access
the information from the data layer.
Give this all a name.
And the only configuration is the data layer variable name.
That is the key that we see in the Javascript object.
So in our case, it will be transaction total, right here.
I'm just gonna copy this and put this in
and once I have this in here, I can just click on save
and I have this now available in my Google Tag Manager
as a variable. What does that actually mean?
Where can we use them? Well now, we can go to the next step
and actually copy our Javascript code here
and implement this as a new tag.
This will again will be a custom html tag.
first of all, give it a name.
And as the html, we're just gonna paste this in.
Now we need to customize this again,
we don't want all our products once this files
actually result in 99 dollars.
So we will dynamically insert our variable,
which can be done with two curly brackets.
Now this opens up a menu with all your different variables
in here, so we can just click on our dlv transaction total,
and that should be replaced dynamically with
whatever is in the data layer at that time.
Next, we can build a trigger and
we want to deploy this on our final checkout page,
so we could for example, look at the url up here and say,
we want to deploy this on our order received page
if that's under your...it's pretty easily built,
We're going to plus here and creating a new trigger,
we will file this on the page view tag
of our thank you page.
And this will be my page view tag,
but only find on some page views,
where the page url contains our order received.
Lets save this, save our Facebook purchase pixel,
refresh our page and check this all out,
lets go back and go through another conversion.
And we get to our order received page,
we see that our Facebook event purchase pixel filed
and in our Facebook pixel helper,
we see that purchase information was transferred
with the value of 45.
In this corresponds, dynamically was inserted through
our variable with the amount of 45.
So this seems to work fine,
lets head over to our Facebook analytics,
and go into the event debugging,
and also here we see a purchase event that was filed
with the value of 45.
Now in Facebook itself,
we could use this for our custom conversions,
so you could create a new custom conversion
where you choose our purchase event
as a custom conversion and once you have that set up,
you will be able to get columns filled,
like in the ads manager,
that correspond to the conversion value of your campaigns.
So if you have a campaign here,
you should be able to see the actual conversion value,
in a column, that you can add here in your ads account.
So that should be filled with the amount that is transferred
later on, which will give you much greater data on
how many clicks did you receive
and how much money did you make in the end.
So overall a really great data set
that you should have in your account.
Now don't forget,
this is currently just running on our browser.
We still need to deploy this as a version,
so to do that you can click that submit button,
enter descriptive name,
and publish this to all your users
so it's live on your website and there hence falls,
will be tracked with their purchases.
So this is how you can install
Facebook pixel tracking for purchases.
Alright so there you have it,
this is how you can set up your purchase pixel
with the help of Google Tag Manager.
Now this is already the end of this little series
on Facebook pixel tracking, if you have any questions,
then please, I'd love to hear from you in the comments below
we always have great discussions there,
and if you haven't yet, then please,
subscribe to the channel right over there
because we'll bring you new videos,
just like this one every week.
Now my name is Julian, see you in the next one.