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

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:

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

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.

  1. In Google Analytics, click Admin in the lower left.
  2. Under Data collection and modification, click Data streams.
  3. Select the Web tab, then click your web data stream.
  4. 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.
  5. 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

  1. 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-.
  2. 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.
  3. 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.
  4. 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.
  5. 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 its ht_purchase event in Realtime, or purchase with 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:

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:

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

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

How to check it works

  1. 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.
  2. A real order. After your next online order, look for ht_purchase in Realtime, or purchase with 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.
  3. 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.
  4. 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

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.