Configure the Facebook (Meta) Pixel tag in Matomo Tag Manager
The Meta Pixel is a JavaScript library that tracks and reports visitor activity from your website to Meta. It enables Meta to measure page views, attribute conversions to Facebook and Instagram advertising, and optimise advertising campaigns.
Matomo Tag Manager includes a built-in Facebook Pixel tag that installs the Meta Pixel on your website without requiring you to edit your website’s source code.
How the pixel works
When a visitor views your web page, the Facebook Pixel tag fires and initialises the Meta Pixel using your Meta Pixel ID and sends a PageView event to Meta.
If a visitor came to your website from a Facebook or Instagram ad, Meta can use the event for attribution and campaign reporting. If they arrived from another source, the event can still be used for features such as audience building and visitor recognition, depending on your Meta configuration and consent settings.
The tag sends data directly from the visitor’s browser to Meta (facebook.com/tr). It does not send tracking data to Matomo and does not consume Matomo Cloud hits.
This guide explains how to configure the Facebook Pixel tag in Matomo Tag Manager. If you want to track actions such as purchases, registrations, or contact form submissions, see Track Meta Pixel Events with Matomo Tag Manager.
Before you begin
Ensure the following prerequisites are in place:
- You will need admin access to a Meta Business account and created the Meta Pixel in Meta Events Manager.
- Note your
Meta Pixel IDas this is needed to setup the tag. - Matomo Tag Manager should be installed on your website and successfully tracking page views.
Configure the Facebook Pixel tag
- Open your Tag Manager container and go to Tags.
- Click Create New Tag and select the Facebook Pixel.
- Provide your
Meta Pixel IDin the Pixel ID field. This ID is found in Meta Events Manager. - Choose a trigger that determines when the Meta Pixel is loaded. The Pageview trigger is commonly used to report every page view to Meta. Then Meta determines whether a page view can be attributed to one of its advertising campaigns.
- If you only want to report page views for selected pages, add a trigger condition to only fire on a specific product, landing, or thank-you page.
- Click Create New Tag to save.
Test the Meta Pixel tracking
- Enable Preview / Debug mode in Tag Manager and check the pixel tag fires correctly.
- Open your browser’s developer tools > Network tab.
- Load the web page and filter requests by:
facebookortr. - When the page loads, you should see a request similar to:
https://www.facebook.com/tr/?id=<PIXEL_ID>>&ev=PageView - To check the page view is recorded in Meta, open your Meta Events Manager > Datasets.
- Select your Meta Pixel.
- Open Test Events and visit your website in a new browser tab.
- If the
PageViewevent appears, the Meta Pixel has been installed successfully.
Troubleshooting
If you do not see any events in Meta, check the following is setup correctly:
- The correct
Meta Pixel IDwas added to the Facebook Pixel tag. - The Tag Manager container with the Facebook Pixel tag was published to your production environment.
- In Matomo Preview / Debug mode, verify the selected trigger and Facebook Pixel tag fire when expected.
- Ensure your browser is not blocking tracking requests.
Next steps
Once configured, the Facebook Pixel tag automatically tracks page views. To track additional visitor interactions, such as purchases, registrations, or contact form submissions, configure Meta standard events using a Custom HTML tag in Matomo Tag Manager. See Track Meta Pixel Events with Matomo Tag Manager.