How to Add Facebook Pixel in Google Tag Manager

How to Add Facebook Pixel in Google Tag Manager

If you are looking for adding Facebook pixel in Google Tag Manager or install Facebook tracking pixel via google tag manager, this is for you.

Facebook pixel is just a code snippet that is used to measure and build an audience for your Facebook ad campaigns. This captures the actions people take on your ad campaigns across multiple devices.

If your online business depends on Facebook ads, then you would be likely to measure how users behave when they see your ad.

As we know that Facebook pixel is just a piece of code that needs to add on your website. To make your website code clean and improve website speed, it is recommended you add Facebook pixel via google tag manager.

 

Create a Facebook Pixel

Before logging into your tag manager account, you should have created a Facebook pixel from the ads manager and copy the pixel code.

facebook tracking pixel code

Create a Tag in Google Tag Manager

Once you copy the facebook pixel code in the above step, login to your tag manager account and select the specific container.

Inside the container workspace, create a new tag.


Enter the tag name as Facebook Tracking Pixel

facebook tracking pixel tag name

Click on the tag configuration and select the tag type as Custom HTML

select custom html tag

Now paste the Facebook pixel code you have copied in the first step into the HTML box.


Click on the advanced settings button and change the tag firing option to Once per page.

fire tag on once per page

Once you are done with this, click on the triggering option and select the trigger to fire on All Page.

facebook tracking tag

Now click on the save button to save this tag.

 

Verify Facebook Pixel Implementation

The final step is to verify whether the Facebook pixel is correctly added in tag manager and if it is running properly on your website.


Once you save the pixel tag, click on the preview button from the top right of the workspace. Open your website in a new tab. If everything is fine you should see the Facebook pixel like below.  

Read Also: The Complete Guide to Google Tag Manager Events

preview facebook tracking tag

To check and diagnose any problems with Facebook tracking pixel you can install Facebook Pixel Helper chrome extension.

If you have any questions about this topic please let us know on Twitter.