Tools / Marketing

Pixel Event Code Builder

Fill in an event once and get the Meta Pixel code, the matching Conversions API payload with a shared event ID, and the GA4 gtag and Google Tag Manager versions. Required parameters are checked as you type.

Event

Values
Products
For the Conversions API (server)

Email and phone are normalised and hashed with SHA-256 in this page. Nothing is sent anywhere.

Checks

    Meta Pixel (browser)

    Meta Conversions API (server JSON)

    POST to the Graph API events endpoint for your pixel from your server with your access token. Your server fills in the visitor's IP address and user agent.

    GA4 (gtag.js)

    Google Tag Manager (dataLayer)

    How to use it

    1. Pick the event, for example Purchase, and fill in the value, currency and products.
    2. Fix anything the checks mark as missing.
    3. Copy the pixel code into your page, the JSON into your server call, and the GA4 or GTM version into your site.
    Event names used

    Each row maps a Meta standard event to the closest GA4 recommended event: ViewContent and view_item, AddToCart and add_to_cart, InitiateCheckout and begin_checkout, AddPaymentInfo and add_payment_info, Purchase and purchase, Lead and generate_lead, CompleteRegistration and sign_up, Search and search. Add shipping info exists only in GA4, and Subscribe only in Meta.

    Questions

    Why do Pixel and Conversions API events need the same event ID?

    When the browser pixel and your server both send the same purchase, Meta uses the event name and event ID to count it once. Without a matching ID the purchase can be counted twice.

    Do I have to hash email and phone myself?

    For the Conversions API, customer data such as email and phone must be normalised and hashed with SHA-256 before sending. This page shows the hashing so you can check your server code gives the same result.

    Is my data sent anywhere?

    No. The code is generated in your browser and hashing uses the browser's built-in crypto. Nothing is sent to Meta, Google or Bliink.