Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

Track Meta Pixel Events in Matomo Tag Manager

Дата публикации: 22-07-2026 01:28:40

Have a question that has not been answered before? Feel free to flick us an email at hello@piwik.org and we shall pop the answer up here for all to see. Thanks!
The post Track Meta Pixel Events in Matomo Tag Manager appeared first on Analytics Platform - Matomo.


Основное содержимое страницы с новостью.

Table of contents
    1. How Meta Pixel events work
    2. Before you begin
    3. Create or identify the Meta event
    4. Configure a trigger
    5. Create a Custom HTML tag
    6. Test Meta Pixel event tracking
    7. Troubleshooting
    8. Next steps

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.

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:

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.

  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

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Configure the Facebook (Meta) Pixel tag in Matomo Tag Manager07.5222-07-2026
2Track visitors from TikTok in Matomo09.1929-07-2026
3Manually report errors with Matomo Tag Manager08.8816-07-2026
4Sample configuration files for high-traffic Matomo deployments011.5413-07-2026
5How to merge and unmerge crashes08.4929-07-2026
6I enabled Crash Analytics but don’t see any crashes09.7229-07-2026
7Manually report errors in Crash Analytics09.1916-07-2026
8Understanding row limits and ‘Others’ rows in Matomo reports08.3317-07-2026
9AI Chatbots Real-time report013.513-07-2026
10Полный гайд по JavaScript-коду отслеживания в Matomo. Часть 10708-07-2026

Классификация: Пресс-релизы. Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 8.59. Источник: piwik.org.