Send Shopify purchases to Google Analytics 4 with the Measurement Protocol
By the HonestTag team ยท Published October 16, 2026
HonestTag sends each verified Shopify purchase to your Google Analytics 4 web data stream from its server through Google's Measurement Protocol. By default it sends its own ht_purchase event, which does not add to GA4's purchase and revenue reports, so you can keep the Google & YouTube app. GA4's standard purchase, and refunds, go only if you turn on the standard purchase switch. Each event carries your Shopify order ID as the transaction ID and goes under the client ID your Google Analytics tag set for the shopper when HonestTag's pixel saw it. You connect it with two values from Google Analytics: the Measurement ID of your web stream and a Measurement Protocol API secret. This page lists what you need, the exact steps, what is sent, and how to check it works.
What you need
- A Google Analytics 4 property with a web data stream, and the Google Analytics tag already running on your store. Google says the Measurement Protocol is meant "to augment automatic collection through gtag, Tag Manager, and Google Analytics for Firebase, not to replace it." When HonestTag's pixel saw the client ID that tag set in the shopper's browser, purchases are sent under it and join the visit; otherwise HonestTag sends a stand-in ID that joins no GA4 user or session.
- The stream's Measurement ID. Google's send events guide says it "identifies your web stream. It is not the same as your Stream ID. It usually starts with G-." HonestTag accepts only a web stream ID that starts with G-.
- A Measurement Protocol API secret for that stream. Google's API secrets page says you must be "an Editor or above" to generate API secrets, and "You can generate up to 10 API secrets per data stream." A role given on the Google Analytics account counts for every property in it. Create one for HonestTag so you can delete it on its own later.
- A paid HonestTag plan for delivery. The free Mirror plan sends no purchases to Google Analytics 4. Connecting Google Analytics 4 needs a paid plan: the free Mirror plan connects Google Ads and Meta only, and a store's first paid plan starts with a 21-day free trial. Google Analytics 4 takes one of your plan's delivery destinations. See pricing.
Will HonestTag double count?
Keep the Google & YouTube app or your GA4 tag if you use it. By default HonestTag sends GA4 only its own ht_ events, which do not add to your GA4 purchase and revenue reports. Turning on the standard purchase switch while the Google & YouTube app or a GA4 tag still sends purchases counts an order twice unless both send its Shopify order ID as the transaction ID.
Why use HonestTag instead of the Google & YouTube app for GA4 purchases
The switch is for a store that wants HonestTag to be its only Google Analytics purchase source. What it gives you:
- Each order's page in HonestTag shows what was sent to GA4 and when.
- If a delivery to GA4 fails, HonestTag retries it, and raises an alert when it cannot get through.
- Refunds go to GA4 as refund events on the same transaction.
The switch
On the Google Analytics 4 card, Use HonestTag instead of the Google & YouTube app or your GA4 tag for purchases: send GA4's standard purchase event is off by default. The card warns: "Turn on only if HonestTag is your only GA4 purchase source. If the Google & YouTube app or a GA4 tag already sends purchases, this counts an order twice unless both send its Shopify order ID as the transaction ID." To turn it on you also tick No Google & YouTube app or GA4 tag sends purchase to this stream, and the save is refused without it. If you connected Google Analytics 4 before October 16, 2026, HonestTag keeps sending GA4's standard purchase until you save the card again with the switch off.
Before you turn it on
- Google's pages describe no setting in the Google & YouTube app that stops only the GA4 purchase event. Google's Shopify event reference says: "If you prefer to stop all Google Analytics data transmission from the app, including purchase events and other data you rely on, you can disconnect the Google Analytics integration within the Google & YouTube app settings in your Shopify admin." That stops all of the app's Google Analytics data, purchases and everything else.
- If you keep the Google & YouTube app connected to this GA4 property, leave this switch off.
Where to find what the card asks
Measurement ID (web data stream)
A data stream is the connection that carries visits from your website into Google Analytics. Your store uses a Web one.
- In Google Analytics, click Admin in the lower left.
- Under Data collection and modification, click Data streams.
- Select the Web tab, then click your web data stream.
- The Measurement ID is in the first row of the stream details. It starts with G-. Do not use the Stream ID, which is a different number.
- To see it, you need the Editor or Administrator role in Google Analytics, given on this property or on the account it belongs to.
Open Data streams in Google Analytics (it opens the last property you used)
Connect Google Analytics 4, step by step
- Copy the Measurement ID. In Google Analytics, click Admin in the lower left. Under Data collection and modification, click Data streams, select your web data stream and copy the Measurement ID from the Stream details panel. It usually starts with G-.
- Create a Measurement Protocol API secret. On the same web stream, click Measurement Protocol API secrets. If Google asks, review and accept the User Data Collection Acknowledgement. Click Create, enter a nickname such as HonestTag, click Create, and copy the secret value. You need the Editor or Administrator role, given on the property or on the account it belongs to.
- Open the Google Analytics 4 card. In your Shopify admin, open the HonestTag app, go to Setup, and on the Google Analytics 4 card choose Paste Measurement ID and API secret.
- Paste and save. Paste the Measurement ID and the API secret. Leave Use HonestTag instead of the Google & YouTube app or your GA4 tag for purchases off unless HonestTag is your only GA4 purchase source, then click Save and send a test event. HonestTag checks the test event with Google's validation server first and saves nothing if Google reports a problem.
- Look for the test event, then a real order. In Google Analytics, open Reports > Realtime or DebugView and look for the event
ht_setup_check. After your next online order, look for itsht_purchaseevent in Realtime, orpurchasewith the standard purchase switch on.
What the save checks: HonestTag first posts the test event to Google's validation server, which "provides detailed messages about any issues found", with the field path, a description and a validation code. If Google lists a problem, nothing is saved. Then it sends the same event, ht_setup_check, once for real with debug mode on, and stores the secret encrypted. What it cannot check: Google says "The validation server does not validate the api_secret or measurement_id" and the Measurement Protocol "does not return HTTP error codes, even if an event is malformed or missing required parameters." A wrong secret is accepted without an error, so the card never calls the connection verified and asks you to look for the test event instead. To change the stream or rotate the secret, paste both values again; they are saved together.
Coming soon: a Google sign-in on this card that creates the API secret for you, after you tick Google's user data collection acknowledgment, and marks the four purchase events as key events. Until the card offers a Google sign-in, connect with the paste steps above.
The four purchase goals in Google Analytics 4
GA4 has no conversion objects to create ahead of time: it records an event name the first time it receives it. Each order reaches your stream as up to three events:
ht_purchase: every order (HonestTag's All Purchases goal). With the standard purchase switch on, GA4's standardpurchaseis sent in its place, and Google markspurchaseas a key event by default on web streams.ht_purchase_nc: new customers.ht_purchase_rc: returning customers.ht_purchase_fcnc: new customers whose first recorded ad click or ad-tagged link was for Google. An FCNC order is sent as bothht_purchase_ncandht_purchase_fcnc.
To report on the ht_ events as key events, mark them yourself. Google's key events page says: "If Google Analytics has already received an event from your website or app, you can mark the event as a key event. New events, on the other hand, might not show up right away, but you can still mark them as key events ahead of time" so that Google Analytics treats them as key events once they arrive. In Admin, under Data display, click Events, then either star an event that is already listed or use + Create event with Mark as key event turned on. Google allows up to 30 key events on a standard property. For how the four goals work on the ad platforms, see the HonestTag conversion actions.
What HonestTag sends to Google Analytics 4
For each eligible order HonestTag sends one request to www.google-analytics.com/mp/collect with your Measurement ID and API secret. The request holds:
- The client ID your Google Analytics tag set for this shopper, which HonestTag's pixel read from the tag's
_gacookie on your storefront. Google says "The client_id should match the ID generated by the Google Analytics tag on your website." When HonestTag never saw that cookie for the visitor, it sends a stand-in ID derived from its own random visitor ID and counts each time it does. - The order time as the event timestamp.
- One
ht_purchaseevent, or GA4's standardpurchasewith the standard purchase switch on, with your Shopify order ID astransaction_id, the currency, and the value without tax and shipping, as Google asks ("Set value to the sum of (price * quantity) for all items in items. Don't include shipping or tax."). The order's shipping goes in the separateshippingparameter. Up to 20 products go initems: product ID, title, quantity and unit price in your shop currency. A custom line item with no product ID is sent by its title. If you turned on new and returning customer status for Google in HonestTag, the event also carriescustomer_type, only when HonestTag knows the answer. - One goal event per goal the order counts toward, as listed above, each with the same transaction ID, the currency and the order value before tax.
HonestTag sends GA4 no email address, phone number, IP address or user agent, and no user_id. It sends no consent field, and Google's reference says "If you don't specify consent, Google Analytics uses the consent settings from corresponding online interactions for the client or app instance." The consent rules HonestTag applies before any delivery are on the server-side delivery page: for EU, EEA, UK and Swiss orders a conversion with no visitor record is not sent. A bundle is sent as one product.
Google says events "can be backdated up to 72 hours". An older one is accepted with its timestamp moved to 72 hours ago. HonestTag does not send a purchase that is more than 72 hours old at send time, so an order never lands on the wrong day in your reports.
What HonestTag reads, and what it never touches
- Reads: nothing from Google Analytics. GA4 has no ad spend or sales claims to compare, so The Gap lists it only with the purchases HonestTag sent it; HonestTag compares ad platforms' spend and claims with your store's own orders.
- Writes: the
ht_setup_checktest event when you save, thenht_purchaseand goal events to the one stream you chose, or, with the standard purchase switch on,purchase, goal and refund events. - Never touches: your tag settings, other events, key event settings, audiences, product links or property settings. A pasted secret is yours: HonestTag never edits or deletes it.
Avoid counting a purchase twice
Google's rule, from its transaction ID page: "Google Analytics deduplicates purchase events with the same transaction ID." It adds: "Transaction ID deduplication only works for data collected through web streams, not app streams." HonestTag's transaction ID is the Shopify order ID, the same on every retry. If your store already sends a GA4 purchase event to the same web stream, through a Shopify app, a theme snippet or Google Tag Manager, and you turn on HonestTag's standard purchase, check which transaction ID it uses. With the same Shopify order ID, GA4 keeps one purchase. With any other ID, such as the order name, GA4 counts the order twice. That is why HonestTag sends its own ht_purchase by default and GA4's standard purchase only when you turn on the switch. HonestTag's ht_ events have their own names, so they never collide with another tool's purchase. The duplicate purchase events guide shows how to find every purchase source on a store.
Refunds, edits and which orders are sent
- Refunds: with the standard purchase switch on, a full or partial refund goes to GA4 as a
refundevent with the same transaction ID, valued without shipping and tax, with any refunded shipping in theshippingparameter. With it off, HonestTag sends GA4 no refund, because a GA4 refund applies to the standardpurchasewith the same transaction ID. - Order edits and upsells: GA4 takes a correction only as a refund, so with the standard purchase switch on, an edit that lowers the order value is sent as a refund event. With it off, no correction is sent. An edit that raises it is not sent; the order proof shows GA4 as not adjusted with the reason.
- Which orders: orders from your online store are sent. Point of sale orders and subscription renewals are not sent to Google Analytics 4; the first order of a subscription is an online store checkout and is sent. Orders from other apps and sales channels are kept out unless you switch them on, as described in which orders are sent.
How to check it works
- The test event. In Google Analytics, open Reports > Realtime and look at the "Event count by Event name" card, or open DebugView (Admin, under Data display). Look for
ht_setup_check. Google's verification guide says an event "must have a client_id that has already been used to send an event from gtag.js," and the test event is not tied to a real shopper, so if it does not show, check with a real order before you replace the secret. - A real order. After your next online order, look for
ht_purchasein Realtime, orpurchasewith the standard purchase switch on. HonestTag's events carry no session or engagement time, and Google says such events "may not be fully reflected in Realtime user counts," so check the event count card, not the active users count. - In HonestTag order proof. Open the order in the HonestTag app. The proof shows GA4 as a destination and its delivery status. Google's reference says "The Measurement Protocol returns a 2xx status code if the HTTP request is received," so for GA4 the status means accepted, not processed.
- On the card. HonestTag checks the connection from time to time against Google's validation server. A healthy card reads "Google Analytics answered the check. It does not confirm the API secret, so look for the ht_setup_check event in Realtime or DebugView."
Error messages and what to do
- "paste the Measurement ID of your web data stream. It starts with G-" The ID was empty or not a web stream Measurement ID. Google notes the Measurement ID "is not the same as your Stream ID."
- "paste the Measurement Protocol API secret value exactly as Google Analytics shows it" The secret field was empty, too long, or had a space or line break in it. Copy it again.
- "Google Analytics rejected the test event (...). Nothing was saved" Google's validation server listed a problem. Its own description follows in the message.
- "the Google Analytics validation server answered HTTP ... Nothing was saved", "Google Analytics answered HTTP ... to the test event" or "Google Analytics did not answer ..." Google did not take the request. Try again in a minute.
- A save with the standard purchase switch on is refused. Tick No Google & YouTube app or GA4 tag sends purchase to this stream once that is true, or turn the switch off. Nothing was saved.
- The test event never appears. The secret or the Measurement ID is wrong, or the secret was deleted. Create a new secret on the right stream and save again.
- A purchase more than 72 hours old. HonestTag does not send it, and the order proof records it as "reached us too late for the platform to accept it". That order is not in GA4.
- Reconnect needed. If Google answers a delivery or a check with HTTP 401 or 403, the card asks you to reconnect: paste the Measurement ID and a new secret.
Disconnecting
Disconnect from the Google Analytics 4 card, or uninstall the app. Sending stops and HonestTag deletes the stored secret. The API secret itself stays on your stream in Google Analytics: delete it there under Data streams, your web stream, Measurement Protocol API secrets.
Frequently asked questions
Do I still need the Google Analytics tag on my Shopify store?
Yes. Google says the Measurement Protocol is meant "to augment automatic collection through gtag, Tag Manager, and Google Analytics for Firebase, not to replace it." When HonestTag's pixel saw the client ID your Google Analytics tag set in the shopper's browser, the purchase is sent under that ID, so GA4 can join it to the visit. When it did not, HonestTag sends a stand-in ID instead: the purchase is still recorded, but it joins no GA4 user or session.
Will GA4 count a Shopify purchase twice?
Not by default. HonestTag sends its own ht_purchase event, which does not add to GA4's purchase and revenue reports. With the standard purchase switch on, it can. Google says "Google Analytics deduplicates purchase events with the same transaction ID." HonestTag's transaction ID is the Shopify order ID. If another tag or app also sends a purchase event to the same web stream with a different transaction ID, GA4 counts the order twice. Leave the switch off while the Google & YouTube app or a GA4 tag sends purchases.
Does HonestTag send refunds to Google Analytics 4?
Only with the standard purchase switch on. Then a full or partial refund goes to GA4 as a refund event with the same transaction ID as the purchase, valued without shipping and tax, with any refunded shipping in its own field. With the switch off, HonestTag sends GA4 no refund events.
Are the HonestTag purchase events key events in GA4?
Google marks purchase as a key event by default on web streams, which applies with the standard purchase switch on. HonestTag's own events, ht_purchase, ht_purchase_nc, ht_purchase_rc and ht_purchase_fcnc, are not key events until you mark them in Google Analytics Admin, under Data display, Events.
Why does HonestTag not say my API secret is verified?
Because Google gives no way to check it. Google says "The validation server does not validate the api_secret or measurement_id" and that the Measurement Protocol "does not return HTTP error codes, even if an event is malformed or missing required parameters." So HonestTag sends a test event and asks you to look for it in Google Analytics.
Does HonestTag send point of sale orders or subscription renewals to GA4?
No. Google Analytics 4 receives purchases from your online store. Point of sale orders and subscription renewals are not sent to it, and orders from other apps and sales channels are sent only if you switch them on in the app.
Related: every HonestTag integration, server-side delivery, first-click attribution, which decides the FCNC event, first-party tracking, and switching from another tracking app.