If you want to track conversions that happen on your website as a result of your Facebook Adverts, you can create a conversion-tracking pixel and add it to the pages of your website where conversions happen…
Source: Facebook
I assume that you know how to generate facebook pixel code and how it should be used – if not, there is a short manual.
As you maybe remember, I am a big fan of Google Tag Manager and in my opinion we should try adding all tags for our website using GTM. The problem is that facebook code should be placed in <head> section while GTM is loaded in <body> section. In fact this is quite easy to be solved.
Ok, so how to add Facebook Conversion Pixel using Google Tag Manager (GTM)? First of all, you have to add GTM container to your webpage – in one of my previous posts I showed how to do it. Moreover probably you know (more or less) how tags should be added – you can find on my blog short tutorial about adding Google Analytics tag. This time we have quite similar situation.
Add new tag to your container
- login to your GTM account
- choose “New Tag” section
- choose “Custom HTML Tag” option
- “Continue“
- paste your Facebook conversion pixel code
- choose “Support document.write” option – that’s the solution to have code being pasted into <head> section
- click “Continue“
Fire on
Facebook Tag has been already defined but still we have no information when it should be fired. Of course the choice is yours but lets say that we want triggered it on all pages. So….
- choose “AllPages” option
- click “Create Tag“
- rename your tag – name is up to you (i.e. “Facebook Canversion Code”)
- “Save“
- your tag is ready 🙂
How to check your new tag?
Of course in source code of your website you can find only GTM code so how to check if Facebook code has been added and is working properly?
- go to the web page where the pixel was placed on
- pixel will send information about that visit to Facebook
- go to Conversion Tracking Tab
- if everything is OK, your pixel’s status will be set to Active
Problems?
In case of problems you can find some answers here:
- Facebook help – general
- Facebook Pixel Troubleshooting
- Facebook Pixel Helper – plugin for chrome browser