Google Analytics 4 purchases for Shopify, from a server.
Leeghwater sends each purchase to Google Analytics 4 from our server, with the Measurement Protocol. You paste a measurement ID and an API secret. Your own Google tag keeps reporting the visit; we make sure the purchase arrives.
Checked against the tool on 29 November 2026.
- None: your own Google tag reports them.
purchase
What you paste
Measurement ID and API secret, from your web stream under Admin, Data streams.
What it is matched by
No contact details. The visitor and the session as your own Google tag knows them.
Good to know
- Each purchase is first checked at Google's validation address. The log shows the result.
- You name the transaction ID your own Google tag uses, so a purchase counts once.
- Without Google's tag in the buyer's browser, the purchase counts but is not tied to a visit.
Connect it, step by step
- Install Leeghwater from the Shopify App Store and open it from Shopify admin.
- In Google Analytics, go to Admin, Data streams, and open your web stream. The measurement ID begins with
G-, such asG-AB12CD34EF. - In the same stream, open Measurement Protocol API secrets and create one.
- In the dashboard, open Settings, then Google Analytics. Paste both, choose the transaction ID your shop’s Google tag sends (see below), and save.
- Nothing goes to Google Analytics until you switch live data on in the settings. Look at a few orders first.
Purchases only
Your own Google tag already reports page views, add to carts and checkouts. A second copy of those from us would count twice, so we send none of them: only the purchase, which comes from the order itself and does not need the thank-you page to load.
A purchase counts once
Google Analytics counts a purchase once when our copy carries the same transaction ID as the one your shop’s Google tag sends, and twice when it does not. Look at a recent purchase in Google Analytics: a long number such as 5873921458321 is Shopify’s order ID, a short one such as 1042 is the order number. Choose that one in the settings.
See it arrive
- Every purchase is first checked at Google’s address for checking events, asked to be strict. The order’s page shows what it said. Then it is sent.
- Google’s answer says nothing of whether it arrived: it answers the same to a wrong ID or secret. So we show these as sent, never as accepted.
- In Google Analytics, open Reports, Realtime: a purchase shows there within minutes. The standard reports follow about a day later. In our own test, a purchase sent this way showed in Realtime and counted as a key event.
Questions
What if Google’s tag is not in the buyer’s browser?
The purchase still counts, but it is not tied to a visit: there is no session to join. It goes under an ID of our own making, and the log says so.
What does a visitor have to allow?
Analytics. A visitor who declines analytics in your cookie banner is not sent. See Consent.
How late can a purchase arrive?
Google takes an event up to 72 hours old. We try again for up to 3 days when Google has a fault.