Meta Pixel Tags
Use a Meta Pixel tag to tell Meta what visitors do on your site. Meta uses
these events to measure which ads led to sales and leads, to show ads to the
people most likely to convert, and to build retargeting and lookalike
audiences.
Nitoriq loads Meta’s library, initializes your pixel once per page, and sends
each event only to that pixel, even if other pixels are on the page. A typical
setup is a Page View tag on every page and a Purchase or Lead tag on the
same trigger as your Report Conversion tag.
Before you start
- you have the pixel’s ID from Meta Events Manager
- the container has triggers for the page views and actions you want to send
- variables exist for values such as order ID, order value, and cart contents
- if you also send conversions server-side, the Meta Conversions API integration is set up in Nitoriq
Configure a Meta Pixel tag
Create the tag
Open the container, choose Tags, choose New Tag, then choose Meta Pixel
under Advertising.
Enter the pixel ID
In Meta Events Manager, open Data sources and choose your pixel. The
Pixel ID is the 15 or 16 digit number under its name. If there’s no pixel
yet, create one with Connect data sources, then Web.
Paste the ID into Pixel ID. To use different pixels on different sites,
store the ID in a variable and enter that variable, such as
{{meta_pixel_id}}.
Choose the event
Pick one of Meta’s standard events, such as Page View, Purchase, or
Lead. To send an event with your own name, choose Custom event and enter a
name of up to 50 characters.
The parameters shown change with the event, and match the ones Meta documents for it.
Fill in parameters
Map each parameter to a fixed value or a variable:
Value: a number such as49.90, sent as a number. Set it onPurchaseso Ads Manager reports revenue and return on ad spend.Currency: pick it from the list, or choose+to use a variable if you sell in several currenciesContent IDs: a list variable, or comma-separated IDsContents: a variable holding a list of{ id, quantity }objects, for example from the data layer
Content IDs, Content Type and Contents matter when you run catalog ads,
which match them to your product catalog. Lead-generation sites can leave them
empty.
Use Additional Parameters for anything else.
Turn on deduplication for conversions
For conversion events such as Purchase and Lead, Deduplication defaults
to Match server-side. Set Transaction ID to the same variable your
Report Conversion tag uses. See
Browser pixels alongside the Conversions API.
Select triggers, save, and publish
Choose the triggers, save the tag, and publish the container.
Meta Pixel fields
Pixel ID
The Meta pixel to send to, or a single variable that holds it.
A value that isn't a valid pixel ID is refused on save; a variable is checked again when the tag fires.Event
A Meta standard event, or Custom event with a name.
Standard events are what Meta optimizes and reports on.Parameters
The object properties Meta documents for the chosen event.
Values are sent with the types Meta expects; unusable values are left out and noted in the debug overlay.Deduplication
Sends an event ID so Meta counts a browser event and the same server-side event once.
Without it, a conversion sent by both the pixel and the Conversions API is counted twice.Additional Parameters
Any other parameter to send with the event.
Covers parameters without a field of their own.Limited Data Use
Turns on Meta's Limited Data Use for US state privacy laws. Meta determines the visitor's location.
Once any Meta tag on the page turns it on, it applies to every Meta pixel on that page.Fire once per page
Sends the event at most once per page load.
Useful for events whose trigger can match more than once.Allow Meta in a Content Security Policy
If your site sets a Content Security Policy, allow:
script-src:https://connect.facebook.netconnect-srcandimg-src:https://www.facebook.com
Check that it works
Open your page with ?niq_debug=1 to see the debug overlay. Each Meta call
appears as meta · trackSingle Purchase along with the values sent.
In Meta Events Manager, use Test events to see events arrive. When
deduplication is set up, a conversion sent by both the pixel and the
Conversions API shows as deduplicated.
A Meta Pixel tag is set up when
- the tag type is
Meta Pixeland the pixel ID is valid - page-view tags fire on DOM Ready, plus Route Change on single-page apps
- conversion tags have deduplication set to match your server-side integration
- the site’s own Meta snippet, if any, isn’t also sending the same events
- the container is published
Was this page helpful?