Hi there and welcome to another video of Measureschool.com - Where we teach you the data-driven way of
digital marketing.
My name is Julian and Today I am going to show you how you can utilise the new Facebook
pixel to build a retargeting audience or track a conversion on your website.
I show you how you can implement this retargeting tag via Google Tag Manager and get the most
out of this tracking pixel.
Lets dive in!
Facebook announced a while ago that they will be changing their custom audience and conversion
tracking pixel over to a new pixel that will encapsulate both which will be called the
Facebook Pixel.
The major difference is that you only need one pixel or one line of code which you then
customise in order to build a custom audience or track a conversion on your website.
Now how does this pixel look like.
If you go into your ad manager of your Facebook campaigns you can go on the tools and here
you will find the pixels and the tab and the Facebook pixel and also the conversion tracking
pixel which will soon go away.
Therefore it is recommended to use the Facebook pixel here.
We can go on the Actions and click on view the pixel code.
Here you can see the new Facebook pixel code which consists of a base-code which you can
see here and you can go ahead and copy this.
Now the new thing about this code is that it actually has custom events which you can
customise the code with.
And these are shown down here – View content search,add to cart and so on.
But there is already a default – track page view option.
So if you deploy this kind of Facebook code than every page view will be recorded which
we actually want for our custom audience to build – so all we need to do is copy this
base code – and go over to our google tag manager -and create a new tag.
Then enter a name – my naming convention is usually the tool and then the purpose of
the tag which is an audience pixel and where it will be deployed.
An identifier to later recognise the Facebook account itself which is obviously made up
here but will be important if different accounts connected to this one google tag manager account.
Now we will go ahead and go with Custom HTML tag as there is no tag template for the Facebook
Pixel at the moment.
Here we can enter our tag which we copied over from our Facebook account.
Now there is no real modification that we need to do on this particular tag to build
a retargeting audience – we just go with continue and choose the all pages trigger
already built in
Click Create Tag and go into the preview and debug mode.It should put our browser in a
certain state in our page itself which is in our case the demo shop.com – we will
see a preview in the debug console.
This console will tell you which tags have just fired.
In our case this Facebook tag just fired and it also fired in all the pages where we google
tag manager installed and in the next page we see that the Facebook tag has fired
Now we can go ahead and publish this to all our users ass a conversion.
A bit of quality control can be done with the Facebook Pixel Tracker plugin from the
Chrome store.
Now the tag is deployed on all the pages and we can go ahead and actually built a custom
audience through this tag .
This is all implemented – we could segment it down to specific pages or a specific amount
of time the user was on our website and this was made possible by this simple implementation
by our Facebook pixel.
So far nothing new- what about the other options we have here to customise the pixel and track
custom events into Facebook directly
Now if we look at all these different interactions = viewed content/search or add to cart – these
are very specific to the website.
One that is very important which is replaced by this new pixel is the purchase event.
The purchase event – once you fire this – replaces our conversion tracking pixel
which you had before.
All you have to do is take our event code here.
Copy this and will go back to Tag Manager and what we can do is go into our Facebook
audience pixel and copy it right here.
Then we still need to change the name so it will still be a Facebook pixel but this time
its a conversion tracking pixel.
And it will fire upon a transaction.
And now we just implement our custom action here behind the last action we had with the
track page view just add a line here and paste our code.
Now when this code executes it will track a page view which is normal . It will also
track a purchase with the value 00 and the currency Euros.
Now we obviously want to customise this and the best way to customise this is with variables.
Now we already have built in variables which we have here which I have available and pulls
directly from the Data layer.
Now if you want to know how to set this up you can refer to our old Conversion Tracking
Video with GTM where I will show you how to set this transaction Total Variable.
Now its safe to say since this is in our system we can use it in our tag – all we have to
do is replace the 00 with curly brackets and our name of our variable which is in our case
the transaction total.
This currency will change according to our store- we don’t have multiple currency in
our case its dollars.
We go with dollars and we are all set.
Now the next step we don’t want to fire this obviously in all the pages – only our
transaction page – and i have already made up a trigger with a custom event called transaction
which you can also see in the old conversion tracking video how i set this up.
Now lets save this and create the tag.
Go into preview and debug mode – back to our page – this time we obviously need to
go through a transaction so I will add something to my card – view this cart.
And place the order.
We get to our transaction page and we see here that our Facebook transaction conversion
pixel has fired.
we can also check that up in our pixel helper where we can see both have fired and what
values have transferred to this pixel.
We see the values 23 and the currency is USD as we have it right here in our page.
So what we can do is actually then go ahead and publish this as a version to all our users.
Now as you saw and maybe before in the pixel code – we have other events you can fire
such as add to cart/wishlist and search which are all custom actions you can define in Tag
manager and fire this modified tag so you get this data available in your Facebook advertising
campaigns and this data is actually very powerful.
Because you can now optimise your campaigns towards one or the other goals.
And check how many of the people who came through your Facebook ads converted into a
purchase or add to cart or search.
The new Facebook pixel gives us great flexibility in deploying only one code basis for all our
different events that we may want to track directly in Facebook.
Now if you want to get a hold of all the different tags that I just put into place in Google
Tag Manager we have bundled them into a Tag Template which you can download at measureschool.com/facebookpixel
and simply upload those to your account.