How to set up Google Analytics 4 (GA4)

Before you start

  • You need a GA4 property with a web data stream for your store.
  • You need the Editor role (or higher) on the GA4 property to create an API secret.
  • GA4 must already run on your storefront. Instant does not install GA4 for you.

Get your details from GA4

  1. In GA4, open Admin
  2. Select Data streams
  3. Select the web stream for your store
  4. Copy the Measurement ID. It looks like G-XXXXXXXXXX
  5. In the same web stream, open Measurement Protocol API secrets
  6. Click Create
  7. Copy the Secret value

Connect GA4 in Instant

  1. In your Instant dashboard, click the Settings cog in the bottom left corner
  2. Select Integrations
  3. Select Google Analytics 4
  4. Paste your Measurement ID
  5. Paste your Measurement Protocol API secret
  6. Click Connect

Note: You can connect one Measurement ID for each site. To use a different Measurement ID, disconnect Google Analytics 4 first, then connect again with the new ID.

Confirm the connection

Instant cannot check your API secret, because Google does not give a way to validate it. For this reason the integration does not show a health result after you connect. To confirm that visits arrive, click a link in one of your Instant emails, then look at Realtime or DebugView in GA4.

How it works

How Instant finds GA4 on your store

When the Instant pixel loads on your storefront, it checks whether GA4 runs on the page and which Measurement IDs it uses. If Instant finds GA4 and you have not connected it, Integrations shows a prompt to connect Google Analytics 4.

If the Measurement ID you connected is not one that your store runs, Google Analytics 4 shows Action required with the ID that Instant found on your store. Disconnect, then connect again with that ID.

Note: A cookie consent banner can stop GA4 from loading for a shopper. Instant can only find GA4 on visits where GA4 loads.

How Instant visits show in GA4

Instant adds these UTM parameters to the links in your emails and text messages:

  • utm_source: instantai
  • utm_medium: the channel, for example email
  • utm_campaign: the flow or campaign name and the touchpoint number, for example ABANDONED_CART#1
  • utm_id: the ID of the flow or campaign

GA4 reads these parameters when the shopper lands on your store, and puts the session in the matching channel.

What GA4 can and cannot attribute

GA4 gives a purchase to the session in which the purchase occurs. Instant gives a purchase to the email or text message that the shopper engaged with. This difference causes most gaps between the two reports.

  • Same browser. A shopper clicks an Instant link and buys in that browser. The UTM parameters stay with the session through to checkout. GA4 attributes the purchase to Instant.
  • Different device or browser. A shopper opens your email on a phone, then buys on a laptop. The laptop session has no UTM parameters. GA4 records the purchase as Direct, or gives it to the last channel it knows for that browser. Instant still attributes the purchase, because Instant knows the shopper.
  • No click. A shopper reads your email, then goes to your store later without a click on a link. GA4 has no UTM parameters for that session.
  • Checkout links. Shopify can remove UTM parameters from links that go directly to checkout. Abandoned Cart and Abandoned Checkout emails use these links by default.

Note: Instant cannot change a purchase in GA4 after GA4 records it. GA4 records the purchase from the shopper’s browser at the time of checkout, and it ignores a second purchase event for the same order.

FAQ

Why does GA4 show less revenue for Instant than my Instant dashboard? GA4 only counts a purchase for Instant when the shopper clicks an Instant link and buys in the same browser. Instant also counts shoppers who buy on a different device or come back without a click. All email and SMS platforms have this gap with GA4.

Can Instant make GA4 match the Instant dashboard? No. GA4 attributes by session and does not let another system correct a purchase that GA4 already recorded. Expect GA4 to show a lower number than Instant.

Why are Instant purchases under Direct in GA4? The shopper bought in a session that had no Instant UTM parameters. The most common causes are a purchase on a different device, a return visit without a click, and checkout links that lost their UTM parameters.

Why does Google Analytics 4 not show as healthy after I connect it? Google does not let Instant test a Measurement Protocol API secret. Instant can only check the format of your details and whether the Measurement ID runs on your store. Use Realtime or DebugView in GA4 to confirm.

Why does Google Analytics 4 show Action required? Your store runs a different Measurement ID from the one you connected. Disconnect Google Analytics 4, then connect again with the ID shown in the message.

How long does it take for data to show in GA4? Realtime shows visits in a few minutes. Standard GA4 reports can take 24 hours or more.

Can I connect more than one GA4 property? No. Each site connects one Measurement ID.

Do I need to add UTM parameters to my Instant links? No. Instant adds them to each link.


For more on UTM parameters, see How to manage UTM Tracking in external platforms with Instant AI.

For more on checkout links, see Why might some attribution tools be missing cart & checkout flow conversions?.