Get the best of the blog straight to your inbox...

How to install a Facebook Pixel to your Google Tag Manager account

Blog image

 
 

If you use Facebook ads - or plan to do so in the future - the Facebook Pixel is going to be your new best friend. 

You spend a lot of time, effort and money getting people to your website: are you really going to let the right people just leave and never come back after viewing one page of your website? We certainly aren’t and you shouldn’t either. 

Have you ever viewed a product online, only to leave that website and be followed by advertisements on Facebook for that exact product? I know what you're thinking, it must be fate - right?

WRONG, it's remarketing. 

Facebook Pixel allows you to remarket to people who have already visited your website, giving you another opportunity to capture them as a lead and hopefully convert them into a paying customer. 

In addition to remarketing, Facebook will also create “look-a-like” audiences based on the data it has collected, allowing you to advertise to more people that are similar to your current visitors. 

With your website and Facebook ads account connected, you can also get much deeper insights into who your customers are and follow their journey from Facebook back through to your website. 

Other benefits of using Facebook Pixel include:

  • Use Facebook conversion tracking
  • Optimise Facebook ads for conversions
  • Optimise Facebook ads for value
  • Gain access to more Facebook ad tools and metrics

Plus so, so, so much more. 

However, you don’t get any of these benefits without adding the Facebook Pixel to your website, so let’s get to it. 

 

Before we start...

You will need Google Tag Manager connected to your website to complete this guide. Click here to learn how to do this before you start with this guide! 

Check if you already have a Facebook Pixel installed on your website.

  1. Download the Facebook Pixel Helper extension to your Chrome browser. If you don’t have a chrome browser you will need to install it to use this tool. 
  2. Visit the page where you have installed the Facebook pixel. If the extension finds the pixel, the </> extension icon will turn blue, and a popup will indicate how many pixels it finds on the page. The popup will also tell you if your pixel is working properly. If not, it will provide error information so you can make corrections.

If you already have a Facebook Pixel installed on your website, it will be best to remove the Pixel code from your website and re-add it using Google Tag Manager(GTM). This will make it much easier to set-up more specific event tracking pixels in the future. 

If you are not sure how to remove the Facebook Pixel code from your website, search around for answers on Google or ask your web developer to help you. 

 

Creating your Facebook Pixel

  1. Login to your business Facebook page. If you don’t have one, create one here. 
  2. Go to your Facebook Events Manager
  3. Select “Data sources” (top left corner) and then click “Get Started” in the Facebook Pixel module (Highlighted yellow)

    Step 1
  4. Name your Pixel. Don’t worry about adding your website address as we will be using GTM to add the Pixel to your website to keep all of your tags in a centralised location.

    Step 2
  5. Select “Manually add pixel code to website” - Highlighted in yellow. 

    Step 3
  6. You should see a pop-up like the image below. This is the Pixel code we will be adding to your GTM account.


step 4

Adding your pixel to your website using GTM


Nice! Now you have your Facebook Pixel created, let’s add it to your website. We are going to make use of the Google Tag Manager (GTM) container that you added to your website in the last guide.

  1. Log in to your GTM account. 
  2. Select your website’s container and click “Add new tag
  3. Name your tag “Facebook Pixel
  4. Under “Tag configuration”, select the “Custom HTML” tag.
  5. Go back to your Facebook events manager page.

    1. If you have closed the window displaying your Pixel code, then go to “set up” > "Install pixel" > "Manually add Pixel code to your website"
    2. Under “Turn on automatic advanced matching” select all of the customer information you want to be collected. 
  6. Copy the code highlighted yellow in the image below.

    step 4
  7. Return to GTM and paste the code into the HTML container.
  8. Under “advanced settings”, go to “tag firing options” and select “Once per page”.

    step 5
  9. Under “Triggering” select “all pages” - If your page looks like the screenshot below, press "save".

    step 6
  10. Test that you have correctly installed your Facebook Pixel by using the Facebook Pixel Helper Chrome extension you downloaded earlier on in this guide. 

    If the </> icon turns blue, you have successfully installed the Facebook pixel to your website using Google Tag Manager. I bet you’re happy that you didn’t have to get into your websites code this time, that is just one of the many benefits of using GTM as a centralised location to store all of your tags.

 

Last but not least...

 

The final step in this process is to adjust your privacy policy in accordance to the changes you have made to the customer data you are collecting. That means you need to provide clear notice that you’re using the Facebook pixel and that your website users information may be collected through cookies or other methods. You also need to let your website users know how they can opt out of having their data collected.

This article by TermsFeed explains how you can update your privacy policy.

Now you have the base level Facebook Pixel code installed, all traffic going to your website will be tracked, allowing you to re-market to them and create look-a-like audiences. 

But you don’t have to stop here if you don’t want to, you can add more “event” pixels to your tag manager account to track more specific events on your website. We won’t be going into detail about this right now, but you can research on google for more details on how you can do this. 

Think a friend or colleague would find this useful?

Share it with them using the social links below!

 

    

Get the latest Customer Obsessed thinking sent straight to your inbox every Monday...