Throttle + Google Analytics 4
Send the GA4 ecommerce funnel from Throttle hosted pages, embedded checkout and headless storefronts, with server-side purchases and refunds.
What the integration does
Throttle sends the GA4 ecommerce funnel: view_item, add_to_cart, view_cart, begin_checkout, add_shipping_info, add_payment_info, purchase and refund. Names and parameters follow GA4’s recommended schema, so GA4 reports and Google Tag Manager’s ecommerce variables work without mapping.
| Where buyers shop | How it works |
|---|---|
| Hosted checkout and cart pages | Throttle loads Google’s tag for your Measurement ID and sends the funnel events. Your Google Tag Manager container never runs on a Throttle domain. |
| Embedded checkout | The checkout forwards its events to your page. The Throttle loader or the React embed sends them to GA4 from your own tag. |
| Your own storefront | The @usethrottle/scripts loader starts the tag, or Google Tag Manager, and maps the events you publish. |
Purchases and refunds come from the server
Throttle sends purchase and refund from its server through the GA4 Measurement Protocol, so ad blockers and closed tabs do not lose a sale. Card payments send at capture. Invoice orders send when the invoice is issued. Each refund, full or partial, sends a refund with the same transaction id, including refunds made in the payment processor’s dashboard. Subscription renewals are not sent.
This runs once you save a Measurement ID and a Measurement Protocol API secret.
Joining the sale to the visit
Throttle records a clientContext on each order: GA client and session ids, UTM parameters, Google Ads click ids, landing page, referrer and consent. Embedded checkout and @usethrottle/cart hand these over for you, so the server purchase lands in the visit that produced it. The same data arrives in your order.created webhook.
Setting it up
In the dashboard, open your application’s Tracking settings and enter:
- your GA4 Measurement ID (
G-…), - a Measurement Protocol API secret, stored server-side and never shown again in full,
- optionally a Google Tag Manager container, used on your own storefront only.
Then add checkout.usethrottle.dev to your GA4 cross-domain linking, and press Send test event to check the connection. Settings are per application and per environment, so test traffic can point at a separate property. The setup guide covers each surface in detail.
Consent
Consent is off by default. Turn on Require consent and the tag still loads, with all four Consent Mode v2 signals denied, so GA4 can model what it cannot measure. You grant consent with ?consent=granted on hosted pages, setConsent in the loader, or the consent prop on the React embed. Throttle shows no consent banner. You can limit the denied defaults to visitors in the EEA, the UK and Switzerland.
Good to know
- If you send
purchaseyourself fromthrottle.completed, remove it, or turn off Throttle sends purchase events. Otherwise revenue is counted twice. - Hosted page URLs are redacted before they reach Google, because they contain a checkout token.
- A status panel shows sent, failed, unattributed and skipped counts for the last seven days.
- Server-side sends are best-effort and aren’t retried.