1001Ferramentas
๐Ÿ“ทValidators

Meta Pixel ID Validator

Validate Meta Pixel ID format (Facebook/Instagram): 15-16 numeric digits. Checks integrity and simple checksum.

โ€”

The Meta Pixel: from Facebook Pixel to the cornerstone of Meta Ads attribution

The Meta Pixel (formerly Facebook Pixel, renamed in 2022 when Facebook rebranded as Meta) is the conversion-tracking pixel that powers advertising on Facebook, Instagram, Messenger and the Audience Network. Without a valid Pixel ID, campaign reports show no conversions, lookalike audiences cannot be built and dynamic retargeting collapses.

The Pixel ID is a 15 or 16-digit integer created inside Meta Business Suite when you set up the Pixel asset. It is shared across all properties (website, mobile app, offline events) that funnel data into the same Pixel container. Validating the format before pasting it into fbq() snippets eliminates a common source of broken installs.

Pixel ID format and validation

  • Pure numeric integer, 15 or 16 digits long.
  • Regex: ^\d{15,16}$.
  • Example: 1234567890123456.
  • No prefix and no separators. If you see letters, dots or dashes, the ID was copied incorrectly.
  • Do not confuse with the Meta Ad Account ID (prefix act_) or the Business ID โ€” those are separate identifiers used in the Graph API.

Base snippet (browser-side)

The official base code goes in <head> and exposes the fbq() global to fire events:

!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){
n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];
t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1234567890123456');
fbq('track', 'PageView');

Standard events vs custom events

Meta defines a catalog of Standard Events that align with prebuilt optimization goals in the Ads Manager. Use them whenever possible โ€” they unlock smart bidding and richer reporting:

  • PageView โ€” generic page load.
  • ViewContent โ€” product detail page.
  • AddToCart โ€” item added to cart.
  • InitiateCheckout โ€” checkout started.
  • AddPaymentInfo โ€” payment method captured.
  • Purchase โ€” order completed (requires value and currency).
  • Lead โ€” qualified lead captured.
  • CompleteRegistration โ€” signup finalized.

When no standard event fits, use fbq('trackCustom', 'EventName', { ...params }). Custom events still feed audiences and retargeting, but cannot be set as the optimization goal of Sales/Leads campaigns without a Custom Conversion mapping.

Conversions API (CAPI): the server-side companion

The Conversions API is Meta's official server-to-server channel. You POST events to graph.facebook.com/v18.0/<pixel_id>/events with your access token, and Meta matches them against browser-side events using a deduplication key (event_id). CAPI is not a replacement for the Pixel โ€” it is a complement. Best results come from running both, deduplicated.

Why CAPI is essential since iOS 14.5 (April 2021) and App Tracking Transparency (ATT): Apple forced apps to ask the user before tracking, and Safari's ITP shortens cookie lifetime to 7 days. The Pixel alone now loses 30 to 60 percent of conversions on iOS. Server-side events bypass the browser entirely, so attribution recovers most of that loss.

Brazilian e-commerce, multi-Pixel setups and Catalog Sales

In Brazil, marketplaces and retailers such as Magazine Luiza, Americanas, Mercado Livre, Casas Bahia and the major D2C players run heavy Meta Pixel + CAPI stacks. Common architectural patterns:

  • One Pixel per brand in multi-brand groups, all under the same Meta Business.
  • Catalog Sales / Advantage+ Shopping campaigns that require a Pixel paired with a product Catalog and dynamic content_ids in ViewContent / AddToCart / Purchase.
  • CAPI Gateway via Stape.io, Zenvia or Tealium for teams that do not want to build the server-side relay.
  • Deduplication using event_id matching between browser and server hits โ€” critical to avoid double-counting Purchases.

LGPD, consent and Pixel Helper for QA

Like Google Analytics, the Meta Pixel drops cookies (_fbp, _fbc) and ships hashed PII (em, ph, fn, ln) when Advanced Matching is enabled. Under LGPD this requires a legal basis โ€” in most cases explicit consent. Block fbevents.js until the user accepts marketing cookies, and respect the user opt-out signal.

For QA, the official Meta Pixel Helper Chrome extension shows every event firing on the page, parameters sent, and whether the deduplication key matches a CAPI counterpart. It is the fastest way to debug a Pixel before going live.

FAQ

Does the Conversions API replace the Pixel?

No. CAPI complements the Pixel. Running both with deduplication (event_id) is Meta's officially recommended setup and yields the highest event match quality.

Did iOS 14.5 really break Pixel attribution?

Yes, significantly. ATT cut the share of trackable iOS users, and Safari ITP limits cookie lifetime to 7 days. Adopt CAPI plus first-party data (hashed email/phone) to recover most of the lost signal.

Is user consent required in Brazil?

Yes. The Meta Pixel processes personal data under LGPD. Use a CMP, condition Pixel firing on the marketing consent category and avoid Advanced Matching for users that opted out.

Can I run multiple Pixels per page?

Yes. Call fbq('init', 'PIXEL_A'); fbq('init', 'PIXEL_B'); and all subsequent track calls fire on both. Use fbq('trackSingle', 'PIXEL_A', 'Purchase', ...) when you need to fire on one only.

Why is my Pixel ID 16 digits while the documentation says 15?

Pixel IDs grew from 15 to 16 digits as Meta scaled. Both lengths are valid โ€” this validator accepts either.

Related Tools