Other tools
Connect Google Analytics 4
Add Google Analytics 4 as a destination under Connections › Tracking & destinations with your Measurement ID and a Measurement Protocol API secret: purchases and refunds then reach GA4 from the server. Separately, sign in with Google under Connections › Channels to read GA4 sessions and key events in ROASaurus.
Two connections, two directions
- Sending (destination): ROASaurus posts purchases, refunds and, if you choose, other events to GA4's Measurement Protocol. Purchases are deduplicated by transaction id, so they can run next to your own GA4 tag. Available on every plan, Free included.
- Reading (Google login): ROASaurus reads sessions, users, key events and revenue per day from the GA4 property you pick, for Website › Search and the warehouse table
ga4_daily.
Before you start
- A GA4 property with a web data stream for your store, and the Editor role on it (to create an API secret).
- The owner or admin role in ROASaurus to add destinations.
- For the hashed user data option: user-provided data collection turned on in GA4.
Steps
Copy the Measurement ID
In GA4, open Admin › Data streams and your web stream. Copy the Measurement ID (
G-followed by letters and numbers).Create an API secret
On the same stream, open Measurement Protocol API secrets, click Create, give it a name such as ROASaurus and copy the secret value.
Add the GA4 destination
In ROASaurus, open Connections › Tracking & destinations, find Google Analytics 4 under Analytics and data and click Add pixel. Paste the Measurement ID and the API secret. Tick Send to the EU endpoint if your property should receive data through region1.google-analytics.com.
You should see: The destination with Purchase and Refund ticked; those two are the default.
Choose the events
Keep Purchase and Refund. Tick page views and cart events only when the GA4 tag is not on your site: GA4 does not deduplicate those between its own tag and the Measurement Protocol.
Choose what to send with purchases (optional)
Under Conversion value and profit signals, Profit can stay off, replace the purchase value, or go along as a
gross_profitparameter while the value stays revenue. You can also sendpredicted_ltvfor a new customer's first order andcustomer_type(new or returning). Registergross_profitandpredicted_ltvas custom metrics in GA4 to report on them.Test, then save
Tick Test mode to send to GA4's validation server (events are checked, not recorded), place a test order, and check Data quality › Deliveries. Untick test mode when the events pass.
You should see: Each delivery with status sent and GA4's answer.
Read GA4 in ROASaurus (optional)
Open Connections › Channels, click Connect on Google, sign in with a Google account that can read the property, and pick the GA4 property (and a Search Console property if you like).
You should see: Website › Search › Google Analytics 4 with sessions and key events per day, after the first sync.
Consent and identity
Each purchase carries the visitor's _ga client id when the storefront script read it, and the GA4 session of that visit, so GA4 can join it to the session. Without marketing consent the event goes out anonymous: no user id, user data, IP address or browser details, and its client id is derived from the order alone. Consent Mode signals ad_user_data and ad_personalization follow the shopper's marketing consent.
Options: Send the shop customer id as user_id (only if User-ID is part of your GA4 setup and privacy notice) and Send hashed email, phone and address (user-provided data, SHA-256 hashed as Google asks).
Late orders
GA4 accepts Measurement Protocol events up to 72 hours old. Orders that arrive later, such as imported history, are not sent.
Common problems
“The Measurement ID looks like G-XXXXXXXXXX.”
Purchases are counted twice in GA4
Page views doubled after ticking them
“Pick a GA4 property to read sessions and key events.”
“Could not list Google properties: …”
Next step
Want GA4 next to orders and profit in your own warehouse?
Export your data to BigQueryStill stuck? Email us.