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.

Facebook Pixel
Facebook Pixel

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
Add new Tag
Add new Tag
  • choose “Custom HTML Tag” option
  • Continue
Choose Custom HTML Tag - GTM
Choose Custom HTML Tag
  • 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
Paste facebook code - GTM
Paste facebook code

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
Trigger for facebook code - GTM
Trigger for facebook code
  • rename your tag – name is up to you (i.e. “Facebook Canversion Code”)
Rename your tag - GTM
Rename your tag
  • Save
  • your tag is ready 🙂
New tag has been added - GTM
New tag has been added

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
Pixel's status - GTM
Pixel’s status

Problems?

In case of problems you can find some answers here:

Leave a comment

Your email address will not be published. Required fields are marked *