Social Media
One of the indispensable tools of digital marketing, Facebook Pixel helps improve your advertising strategies by tracking user behavior on your website. Google Tag Manager (GTM), on the other hand, is a convenient tag management system that allows you to control such code snippets from a central location.
What is Facebook Pixel?
Facebook Pixel is a small JavaScript code you add to your website that allows you to track visitor behavior (such as page views, button clicks, and form submissions) and optimize your ads accordingly. With the data you collect, you can more accurately define your target audience and shape your ad campaigns based on performance.
The Role of Google Tag Manager
Google Tag Manager enables you to manage the codes you would normally have to add manually to your website from a centralized panel. With GTM, you don’t need developer support for code changes on your site—you can update all your tags, triggers, and variables through a user-friendly interface.
So how do you integrate the two and configure event tracking? Here’s your step-by-step guide!
- Install Google Tag Manager on Your Website
a) Creating a GTM Account
Log in to Google Tag Manager.
Click the “Create Account” button and fill in the account name, site URL, and location information.
Select “Web” as the target platform type and click “Create” to proceed.
b) Adding GTM Code to Your Website
Copy the GTM “Installation Code” you generated (the first box goes between the <head>
tags, and the second box goes at the beginning of the <body>
tag).
Add these codes to all pages of your website (if you’re using WordPress, you can add them to your theme files or integrate via a plugin).

2. Create Facebook Pixel and Add It to GTM
a) Creating Facebook Pixel
Go to “Data Sources” > “Pixels” in Meta Business Manager.
Click the “Add Pixel” button to create a new Pixel and give it a name.
b) Adding Pixel to GTM
In the GTM interface, go to “Tags” > “New” > “Tag Configuration”.
Select the “Facebook Pixel” template (or create a “Custom HTML” tag if it’s not available).
Paste your Pixel code from Facebook into the appropriate field.
3. Activate Basic Page View Event
Add a “Trigger” to the Pixel tag you created.
Select the “All Pages” trigger to make the Pixel send data every time a page loads.
Click “Save” and then “Submit” to publish your changes in GTM.
4. How to Track Custom Events (Example: Form Submission)
a) Creating a Trigger
In GTM, go to “Triggers” > “New”.
Choose a trigger type like “Form Submission” or “Click”.
Use the “Element Selector” to specify the form’s ID or class.
b) Configuring the Tag and Event
Go to “Tags” > “New” and select “Facebook Pixel”.
Set the “Event Type” to something like “Lead” (form submission) or “Purchase” (purchase).
Link the trigger you created to this tag and save your settings.
5. Testing and Verification
Enable “Preview” mode in GTM to test the setup.
Perform actions like filling out a form or adding a product to the cart, and use the Facebook Pixel Helper extension to verify that data is being sent correctly.
Setting up Facebook Pixel with GTM speeds up your data collection process and adds flexibility. With this configuration, your ad optimization and conversion tracking become more accurate. You’ll better understand user behavior and make more efficient use of your advertising budget. Remember: a proper setup and thorough testing will directly impact the success of your digital marketing strategy.
To learn about the services provided by Marker Groupe, you can contact us via the MarkerGroupe.com website or via the e-mail address hello@markergroupe.com.