Google offers a huge list of products that can be integrated into a website to help manage the he...
Add Facebook Pixel to Google Tag Manager
How to add Facebook Pixel code to Google Tag Manager:
Before you begin make sure you've set up a Google Tag Manager account and added the GTM code to thewebconsole (read our helpful guide here). Access your Facebook for Developers account and generate the Facebook Pixel tracking code and ID. Follow the steps below:
- Open Google Tag Manager
- Select your website's container and click Add a new tag
- Give this tag a name and click Tag Configuration
- Click Custom HTML Tag
- In Facebook, navigate to your Facebook Pixel page
- Click Actions > View Pixel Code
- Copy the entire Pixel base code as seen here: https://i.imgur.com/JOKtrpE.png
- Back in Google Tag Manager, paste the code in the HTML container
- Click the Advanced Settings dropdown and select Once per page under Tag Firing Options
- Left click "Triggering" - if you see page view, select page view. Once the window loads back, left click on page view again and hover over the page view trigger under trigger configuration. Click the pencil and ensure all page views is selected.
- If you do not see the page view option, you can click Triggering and then the + in the top right next to the magnifying glass. Name your trigger and click Trigger Configuration. Select page view from the trigger type list and make sure all page views is selected under "This trigger fires on". Click Save.
- Click Save again and then Submit in the top right corner of your page. You will need to name your version release and possibly add some notes. This will then deploy the code onto your site, which can be checked using the Facebook Pixel Helper Chrome extension (available here). Note: these pixels will not be visible in the code in any other way.
Last Modified: 22 June 2022