WiscWeb - WordPress UW Theme - Adding a Facebook Pixel to a Website Using Google Tag Manager

This document will provide step-by-step instructions for adding a Facebook pixel to a website using Google Tag Manager. Google Tag Manager is used to track events that users trigger when visiting your website. 


Preparatory Steps

Before you get started, you will need a Facebook Pixel and a Google Tag Manager account.

Facebook Pixel

To get the pixel, you can follow Facebook's step-by-step guide. During the Install Pixel step, choose manually install pixel code yourself.

Google Tag Manager Account Setup

To setup Google Tag Manager, follow the vendor documentation steps. Note: You will not need to add any Google Tag Manager code to your website as the instructions indicate. Instead, you'll be connecting the account to your WiscWeb site via the Customizer. 

Adding Facebook Pixel to Google Tag Manager

  1. In Google Tag Manager, navigate to your Workspace Tab.

    Tag Manager workspace
  2. From your Workspace Tab, navigate to Tags and click the button labeled New.

    Google Tag Manager screenshot showing Tags options
  3. Name your new tag Facebook Pixel and set the Tag Type to Custom HTML.

  4. In the HTML field, paste the Facebook Pixel code.

  5. In the Triggering section, select All Pages to add the tag to every page within your website.

    Custom HTML tag
  6. Click Save in the upper-right hand corner of the window.

  7. Next, publish your changes by clicking the Submit button in the upper-right section of the page.

    Submit button
  8. Lastly, test the pixel using the Facebook Pixel Helper to ensure that it is working as expected.

Add Google Tag Manager ID to WiscWeb

Locate the Google Tag Manager ID

  1. In your Google Tag Manager account, open a container.

  2. In the top right corner, you should see some text that starts with GTM- 

  3. Copy this text (including the GTM- part)

Paste the ID into the Customizer in WiscWeb

  1. Login to your WiscWeb site

  2. Click on the Appearance link on the left menu

  3. Choose Customize

  4. Scroll down in the Customizer menu and select the Google Services option

  5. Paste in your Google Tag Manger tracking ID

See Also:

Keywords:Facebook pixel, Google, Tag Manager, WordPress, Analytics   Doc ID:108778
Owner:Jonathan D.Group:WiscWeb CMS
Created:2021-02-01 14:50 CDTUpdated:2022-04-29 17:16 CDT
Sites:WiscWeb CMS
Feedback:  0   0