Meta Pixel events let you measure the actions that visitors take on your website after interacting with your Facebook or Instagram advertising. By tracking events such as purchases, registrations, and contact form submissions, you can measure conversions, build audiences, and optimise your advertising campaigns in Meta.

How Meta Pixel events work

After you have configured the Facebook Pixel tag in Matomo Tag Manager, you can track additional visitor interactions by sending Meta standard events.

When a visitor performs an action on your website, such as clicking a button, submitting a form, or completing a purchase, Matomo Tag Manager can trigger a Custom HTML tag that calls the Meta Pixel JavaScript API (fbq) to send the appropriate event to Meta.

Meta recognises a predefined set of standard events that can be used for conversion tracking, audience building, and ad optimisation. Read the specifications for Meta pixel standard events.

This guide explains how to track these events with Matomo Tag Manager. The setup uses the Facebook Pixel tag and a new Custom HTML tag to send standard Meta events when your visitors from Facebook or Instagram perform specific actions on your website.

Before you begin

Ensure the following prerequisites are in place:

Create or identify the Meta event

Before configuring Matomo Tag Manager, decide which Meta standard event you want to report, such as Lead or Purchase.

If you are unsure which event to use, or want to configure your website using Meta’s guided setup:

  1. Open Meta Events Manager > Overview.
  2. Click Setup events or Add Events to launch the Event Setup Tool.
  3. The Event Setup Tool lets you browse your website and select buttons or other interactive elements. For example, if visitors click on the form’s Send button to submit, assign the Lead event to the Send button.
    identify page meta event

Next, you will need to configure Matomo Tag Manager to send the same Meta event when the equivalent visitor action occurs.

Configure a trigger

Create a trigger for the visitor action that should send the Meta event. This trigger will be assigned to the new Custom HTML tag created later.

The trigger should match the same interaction you identified in the Meta Event Setup Tool. For example, if you associated the Lead event with a contact form’s Send button, configure Matomo Tag Manager to fire when that form is submitted or when the Send button is clicked.

  1. Open your Tag Manager container and go to Triggers.
  2. Click Create New Trigger and select the Form Submit trigger.
  3. Choose one of the following trigger types (for example):
    • Form Submit fires when the contact form is successfully submitted. You can optionally restrict the trigger to a specific form using its name or ID.
    • All Elements Click fires when the visitor clicks the Send button. Restrict the trigger to the required button using a click attribute, such as its ID, class, or text.
  4. Click Create New Trigger to save.

Create a Custom HTML tag

⚠ Before sending any Meta events, Configure the Facebook Pixel tag in Matomo Tag Manager. The Meta Pixel tag must fire before any Custom HTML tags that call fbq() otherwise, the event cannot be sent to Meta.
  1. Go to Tags and click Create New Tag.
  2. Select the Custom HTML tag and provide a descriptive tag name.
  3. Select the trigger created previously, for example, Form Submit trigger.
  4. In the Custom HTML field, enter the Meta Pixel event code. For example, to send a Lead event:
<script>
fbq('track', 'Lead');
</script>

Many Meta events support optional parameters that provide additional context, such as a Purchase event:

<script>
fbq('track', 'Purchase', {
    value: 249.99,
    currency: 'USD'
});
</script>

If your website exposes values such as the order total or currency through the data layer or JavaScript, first create the corresponding data layer variables in Matomo Tag Manager. You can then reference those variables in the event code:

fbq('track', 'Purchase', {
    value: {{Order Total}},
    currency: '{{Currency}}'
});

Save the new tag and verify the tracking configuration before publishing the container to your live site.

Test Meta Pixel event tracking

  1. Open your browser’s developer tools and enable Preview / Debug mode in Tag Manager.
  2. Perform the action you are tracking, such as submitting the contact form.
  3. Check the Facebook Pixel tag and the Custom HTML tag fires.
  4. In developer tools > Network tab, filter requests by: facebook or tr.
  5. You should see a request similar to:
    https://www.facebook.com/tr/?id=<PIXEL_ID>>&ev=Lead or
    https://www.facebook.com/tr/?id=<PIXEL_ID>&ev=Purchase
  6. The ev parameter should match the event configured in your Custom HTML tag.
  7. To check the page view is recorded in Meta, open your Meta Events Manager > Datasets.
  8. Select your Meta Pixel.
  9. Open Test Events and confirm that the event appears.
    test event in meta

Troubleshooting

If you do not see any events in Meta, check the following is setup correctly:

  • The event is defined correctly in Meta.
  • The Facebook Pixel tag is configured and successfully tracking page views.
  • The container with the Facebook Pixel tag and new Custom HTML tag has been published to your production environment.
  • In Matomo Preview / Debug mode, verify the triggers and tags fire when expected.
  • Ensure your browser is not blocking tracking requests.

Next steps

Once the Meta Pixel is tracking the configured event, you can repeat the setup steps to create additional Meta standard events, such as ViewContent or AddToCart, and verify each event in Meta Events Manager.

Previous FAQ: Configure the Facebook (Meta) Pixel tag in Matomo Tag Manager