# Google Analytics 4

Add your **Google Analytics 4** Measurement ID, and your booking pages and routing forms report to your own
Google Analytics property: a page view for each page, and an event for each step a visitor takes toward a
booking. Every event name starts with `x42min_`, so they're easy to find in your reports.

Google Analytics loads on your public pages only, and only after the visitor accepts the cookie notice. Inside
an embed on your own website it never loads. There, [the embed's events](/help/booking-pages/embed-events)
reach your website's own tags instead.

## Setting it up

You need the Owner or Admin role. Other members see the Google Analytics 4 tile dimmed, with "Ask an admin to
set it up" under its name.

1. In Google Analytics, open **Admin**, then **Data streams**, pick your web stream and copy its
   **Measurement ID**. It starts with `G-`.
2. In 42min, open [Integrations](/360/integrations?category=analytics). The link opens on the **Analytics**
   filter of the **Add an integration** list.
3. Click **Connect** on the **Google Analytics 4** tile. That opens its page.
4. Paste the ID into **Measurement ID** and click **Save**.

Google Analytics 4 then moves to **Your connections** at the top of Integrations. Its row reads "Active:"
followed by your ID, and its **Settings** link opens [its page](/360/integrations/google-analytics).

## What your visitors see

When someone opens one of your pages, a small notice in a corner says that your organization (by name) uses
Google Analytics 4 on this page to measure visits and bookings. It offers **Decline** and **Accept**, with a link
to the Cookie Statement. Nothing from Google loads and no cookie is set until they click **Accept**.

The answer is remembered in that browser for 12 months, for all of your organization's pages. If you later add a
platform the visitor hasn't accepted yet, such as Google Ads, the notice asks again on the pages that use it.

A browser that sends Global Privacy Control and hasn't answered the notice counts as declining, and the notice
doesn't appear. An earlier **Accept** in that browser still stands until it expires or the visitor answers again.

Events that happen before the visitor answers wait in the page. Accepting sends them, and declining drops them.

Before Google Analytics loads, 42min cleans the page address: names, email addresses and other prefilled details
are removed from it, and only the campaign parameters and the language stay. Parameters such as `utm_source`,
`utm_campaign` and `gclid` therefore still show in your reports where visitors came from. Bookings are not
affected: they record the same details as before.

## The events

| Event | Sent when |
|---|---|
| `x42min_landing_viewed` | your landing page or a team page opens (`page_kind` is `user` or `team`) |
| `x42min_booking_page_viewed` | a booking page opens |
| `x42min_date_selected` | the invitee picks a date |
| `x42min_time_selected` | the invitee picks a time |
| `x42min_booking_form_started` | the invitee starts the booking form |
| `x42min_booking_submitted` | the booking form is sent |
| `x42min_booking_confirmed` | the booking is confirmed, with no approval or payment pending |
| `x42min_booking_requested` | a booking that needs your approval is requested |
| `x42min_booking_disqualified` | qualification screens the invitee out |
| `x42min_checkout_started` | a paid booking leaves for the payment page |
| `x42min_routing_form_viewed` | a routing form opens |
| `x42min_routing_form_started` | the visitor gives a first answer |
| `x42min_routing_form_submitted` | the routing form is sent |
| `x42min_routing_form_routed` | the form decides where the visitor goes |

Each event carries parameters such as `event_type_name`, `duration_minutes`, `team_name`, `routing_form_name`
and `language`. The [list of parameters](/help/booking-pages/embed-events#parameters) applies here too, except
`meta_event`: only the messages an embed sends carry it, so Google Analytics never receives it. No event carries
the invitee's name, email address, phone number or answers.

`x42min_booking_confirmed` is sent once per booking, right before the confirmation page opens. Reloading the
confirmation page never counts it again.

### What isn't measured

Cancel, reschedule and payment pages carry private links, so Google Analytics never loads on them, nor on the
confirmation page or on single-use links. Payments completed, reschedules, cancellations, Roundtable votes and
bookings made through single-use links therefore don't reach Google Analytics. For a paid booking,
`x42min_checkout_started` is the last step you see.

## What Google collects by itself

Under the Measurement ID field, the page says: "If you allow user-provided data collection in your Google
Analytics settings, Google may collect customer data, such as email addresses, from your booking pages." 42min
never sends an email address or a phone number to Google Analytics, but that Google setting can collect them
from the page itself. It lives in your Google Analytics property, not in 42min.

## Pages with their own settings

Your organization's settings apply to every landing page, team page, booking page and routing form. An event
type, a routing form or a team can choose otherwise in its own **Analytics** section:

- **Use organization settings**, the default, shows your organization's IDs.
- **Off** runs no analytics on that page, and embeds of it send no events either.
- **Custom** gives the page a complete set of its own, prefilled from your organization's.

The section is a card under **More settings** in the [event type](/360/events) editor, a heading on the
**Customization** tab of a [routing form](/360/routing), and a block in each team's settings on the
[Teams](/360/teams) page, where it has its own **Save** button. A team event type that uses the organization
settings follows its team's own settings first, when the team has them. Whoever can edit an event type or a
routing form can change its section, and a team's is for the Owner and Admins. A managed event type takes its
section from its template.

The [Google Analytics 4 page](/360/integrations/google-analytics) lists every event type, routing form and team
with settings of its own under **Pages with their own settings**. Each row shows the kind (Event type, Routing
form or Team), whether it is **Off** or has its own settings, and links to where it is set.

## Removing it

On the Google Analytics 4 page, click **Remove Google Analytics 4** and confirm. Pages that follow your
organization's settings stop loading Google Analytics. Event types, routing forms and teams with settings of
their own keep them.

## Common pitfalls

- **Nothing in your reports.** Only visitors who accepted are measured, and ad blockers stop Google Analytics.
  To check your setup, open a booking page in a private window, accept the notice, and watch the **Realtime**
  report.
- **Events from an embed are missing.** Google Analytics never runs inside an embed. Send the embed's events to
  your website's own Google tag: see [Events from embeds](/help/booking-pages/embed-events).
- **"A Measurement ID starts with G- followed by 4 to 15 letters or digits."** Universal Analytics IDs (`UA-`)
  and Google tag IDs (`GT-`) are refused. Copy the ID of a GA4 web data stream.
