# Meta Pixel

Add your **Meta Pixel** ID, and your booking pages and routing forms send their events to your pixel. Meta always
receives PageView, ViewContent and InitiateCheckout as standard events, plus the two standard events you choose:
one for a confirmed booking and one for a submitted routing form, **Schedule** and **Lead** unless you pick
others. Every other step arrives as a custom event named with its `x42min_` name.

The pixel loads only on your public pages, only after the visitor accepts the cookie notice, and never inside an
embed.

## Setting it up

You need the Owner or Admin role.

1. In Meta Events Manager, open **Data sources**, pick your pixel and copy its ID, a number of 6 to 20 digits.
2. In 42min, open [Integrations](/360/integrations?category=analytics), pick **Analytics**, and click
   **Connect** on the **Meta Pixel** tile.
3. Enter the **Pixel ID**.
4. Choose the **Standard event for a confirmed booking** (Schedule by default) and the **Standard event for a
   submitted routing form** (Lead by default). The choices are Schedule, Lead, CompleteRegistration, Contact and
   SubmitApplication.
5. Click **Save**.

## The events

| 42min event | Meta event |
|---|---|
| `x42min_landing_viewed`, `x42min_routing_form_viewed` | PageView |
| `x42min_booking_page_viewed` | PageView and ViewContent |
| `x42min_booking_confirmed` | your standard event for a confirmed booking |
| `x42min_routing_form_submitted` | your standard event for a submitted routing form |
| `x42min_checkout_started` | InitiateCheckout |
| every other event | a custom event with its `x42min_` name |

A confirmed booking carries the booking's ID as its event ID, so Meta counts it once. Each event goes to your
pixel alone, even when other pixels run on the same page. The events and their parameters are described on
[Events from embeds](/help/booking-pages/embed-events#events). With **Advanced matching** on, a page sends Meta
nothing after the event that gave it the hashed details: see [Advanced matching](#advanced-matching).

## Advanced matching

Turn on **Advanced matching** to give Meta the invitee's email address and phone number with confirmed bookings,
booking requests and submitted routing forms, so it can match more of them to people who saw your ads. They are
hashed with SHA-256 in the visitor's browser before they leave it. They go only to Meta, and only with
`x42min_booking_confirmed`, `x42min_booking_requested` and `x42min_routing_form_submitted`. Before hashing, the
email address is trimmed and lowercased, and the phone number keeps its digits only, country code included.

Meta keeps these details for the rest of the page, not only for the event they came with. So once your booking
page or routing form has given them to Meta, that page sends Meta nothing further. A booking page leaves right
after the booking, so nothing is missed there. On a routing form, the submission is the last event Meta receives:
the routing result, `x42min_routing_form_routed`, does not reach it. Embeds are not affected: the embed's events
keep reaching your website's own tags, every one of them.

Under the toggle, the page says: "If you turn on automatic advanced matching in Meta Events Manager, Meta
collects customer data from your booking pages whatever this setting says." That setting lives in Events
Manager, not in 42min.

From an embed on your website, advanced matching goes through your own Google Tag Manager, because only your tags
know your pixel's ID: see the [Google Tag Manager recipe](/help/booking-pages/embed-google-tag-manager#6-meta-pixel).

## Websites that may receive hashed identifiers from embeds

It is the same list as on the
[Google Ads page](/help/integrations/google-ads#websites-that-may-receive-hashed-identifiers-from-embeds), and
editing it here changes it there too.

## Pages with their own settings, and removing it

An event type, a routing form or a team can follow the organization's settings, turn analytics off, or use a
pixel of its own: see
[Pages with their own settings](/help/integrations/google-analytics#pages-with-their-own-settings). To stop the
pixel on every page that follows your organization's settings, click **Remove Meta Pixel** on the
[Meta Pixel page](/360/integrations/meta-pixel) and confirm.

## Common pitfalls

- **No events in Events Manager.** Only visitors who accepted the notice are measured, and ad blockers stop the
  pixel. Use **Test events** in Events Manager while you accept the notice yourself.
- **Events from embeds.** The pixel never runs inside an embed. Send the embed's events to your website's own
  pixel instead: choose **Meta Pixel** under **Send events to** in the
  [embed code](/help/booking-pages/embedding). Those events carry no hashed email or phone. For advanced
  matching, use the [Google Tag Manager recipe](/help/booking-pages/embed-google-tag-manager) instead.
