How Google Analytics 4 gets your Shopify data
Google Analytics 4 can receive your store’s data from two places. Google’s tag runs in the shopper’s browser and records the visit. The Measurement Protocol lets a server send events straight to Google Analytics; Google built it to add to the tag, not to replace it.
WeProfit uses both. Its server sends purchases, refunds and other store events through the Measurement Protocol, and your visits come from a Google tag: the one WeProfit loads on your store, or one you already run, such as the tag Shopify’s Google & YouTube app adds. You choose which when you connect.
In WeProfit, Google is one network with two connections: Google Analytics 4, covered on this page, and Google Ads, which receives purchases uploaded from WeProfit’s server through Google’s Data Manager API. You can use either one or both.
Connect Google Analytics 4 in WeProfit
You need a Google Analytics 4 property with a web data stream for your store, and the Editor or Administrator role on that property to connect it with Google sign-in. Sign in with Google needs a WeProfit login; entering the Measurement ID and API secret by hand also works when you open WeProfit from your Shopify admin without logging in.
The API secret can only send events: it cannot read your reports or change your Google Analytics settings. If you later disconnect your Google account from this page, delivery continues; only the Google cards described below stop.
- In WeProfit, open Ad Networks > Google Analytics 4 and select Sign in with Google. Use the Google account that has access to your property.
- Choose the property and its web data stream. If the property has no web data stream yet, add one in Google Analytics under Admin > Data collection and modification > Data streams > Add stream > Web, then choose the property again.
- Choose who adds the Google Analytics 4 tag: WeProfit, or your own tag. The next section explains both choices.
- Tick Google’s user data collection acknowledgement, shown in Google’s own words, and connect. Google requires this acknowledgement before an API secret can be created. WeProfit then creates a Measurement Protocol API secret named WeProfit Server-Side Tracking, or reuses it when you connect the same data stream again.
- To connect by hand instead, select Enter the ID and secret, or Add destination when you open WeProfit from your Shopify admin without a WeProfit login. In Google Analytics, open Admin > Data collection and modification > Data streams and your web stream, copy the Measurement ID (it starts with G-), then open Measurement Protocol API secrets, accept the User Data Collection Acknowledgement if Google asks, and create a secret. Enter both in WeProfit and choose who adds the tag.
- Select Send test. WeProfit sends a test page view to Google’s validation server, which checks the event’s format. Google does not check the API secret there, and test events never appear in reports, so confirm a real event in Google Analytics next.
Who adds the Google Analytics 4 tag: WeProfit or you
When you connect, you choose WeProfit adds the Google Analytics 4 tag or Keep my own Google Analytics 4 tag. The first is the default for a new connection. Either way, WeProfit’s server sends the purchases.
Choose WeProfit adds the Google Analytics 4 tag only after you turn off every other Google Analytics 4 tag for that property, such as the one from Shopify’s Google & YouTube app, Google Tag Manager or theme code. WeProfit asks you to confirm this, because two tags make Google Analytics count visits twice. In this mode each browse event is sent once: when the tag did not send a page view, product view or search, WeProfit’s server sends it instead.
With Keep my own Google Analytics 4 tag, your visits must come from your own tag. The destination card checks whether a Google Analytics 4 tag for your Measurement ID set its cookie on your store in the last 7 days, and warns you when it found none. A Google Analytics 4 destination with conditions never gets WeProfit’s tag; WeProfit’s server then sends every event that matches the conditions.
| Your choice | Google’s tag in the browser | WeProfit’s server |
|---|---|---|
| WeProfit adds the Google Analytics 4 tag | Page views, product views and searches; on Shopify also collection views, product clicks on collection and search pages, and cart views | Add-to-carts, remove-from-carts, checkout steps, purchases, refunds, leads, sign-ups and custom events, plus any page view, product view or search the tag did not send |
| Keep my own Google Analytics 4 tag | Whatever your own tag sends today | Purchases, refunds, leads, sign-ups and your custom events only; no page views |
Which store events reach Google Analytics 4
WeProfit sends store events under Google Analytics 4’s own event names. Purchases carry the order total as value, the currency, the transaction_id and the items with their ID, name, price and quantity, timed at the moment of the order.
Refunds go as refund events with the refunded amount, in the purchase’s currency and with its transaction_id, and only to a connection that received the purchase; a cancellation without a refunded amount sends nothing. Custom events keep their own name in lower case, with other characters turned into underscores, up to 40 characters. The dashboard has no on or off switch per event: to limit what a connection receives, add a condition such as Event is any of.
With a purchase, WeProfit’s server also sends the buyer’s hashed email address and phone number, the hashed first and last name when the order has them, and the IP address and user agent.
Some orders are never sent: orders placed before WeProfit was installed, including imported history, Shopify POS, draft and mobile-admin orders, subscription renewals, and orders already cancelled when WeProfit processes them. Except for cancelled orders, they still count in WeProfit’s revenue and profit.
| Store event | Google Analytics 4 event |
|---|---|
| Page view | page_view |
| Product or content view | view_item |
| Search | search |
| Collection view (Shopify, browser tag) | view_item_list |
| Product click on a collection or search page (Shopify, browser tag) | select_item |
| Cart view (Shopify, browser tag) | view_cart |
| Add to cart | add_to_cart |
| Remove from cart | remove_from_cart |
| Checkout started | begin_checkout |
| Shipping step | add_shipping_info |
| Payment step | add_payment_info |
| Purchase | purchase |
| Refund | refund |
| Lead | generate_lead |
| Sign up | sign_up |
Count each sale once in Google Analytics 4
Google Analytics deduplicates purchase events that carry the same transaction ID, for data from web streams. By default, WeProfit’s purchases and refunds carry the Shopify order ID as transaction_id.
With Keep my own Google Analytics 4 tag, choose the Order identifier your tag reports: Order ID, the order’s own ID such as 6012345678901, or Order number, the number your customers see such as #1001. When both copies carry the same ID, Google Analytics counts the sale once. With WeProfit adds the Google Analytics 4 tag, purchases carry the order ID.
If another tool also reports purchases to the property, check which order identifier it uses: a sender with a different ID counts the sale again, and a passing test cannot show that independent senders deduplicate.
If you also import Google Analytics 4 key events into Google Ads and use WeProfit’s Google Ads uploads, keep only one of them as a primary purchase action, or Google Ads can count each sale twice.
Google Analytics 4 and Google Ads: one network, two connections
Google counts as one of WeProfit’s 10 ad networks, with two separate connections. Google Analytics 4 gets store events for your analytics reports. Google Ads gets only purchases from WeProfit’s server: no page views, carts, checkouts or refunds. Refunds go to Google Analytics 4 only.
Importing Google Ads spend is a third, read-only connection: connecting it does not upload purchases, and connecting Google Ads conversions does not import spend. When a Google Ads account is connected, WeProfit also loads that account’s Google Ads tag on your store, which sends page views and product views for remarketing.
| Connection | How you connect | What WeProfit’s server sends |
|---|---|---|
| Google Analytics 4 | Sign in with Google and choose a property and web data stream, or enter the Measurement ID and API secret | Store events through Measurement Protocol, including purchases and refunds; which others depends on who adds the tag |
| Google Ads | Connect with Google, then pick up to 10 Google Ads accounts per store | Purchases only, uploaded through Google’s Data Manager API into WeProfit’s conversion actions, such as Purchase - WeProfit |
Check that Google Analytics 4 receives your events
The CAPI delivery log on the Google Analytics 4 page lists every event WeProfit’s server sent, with the columns Created, Event, Destination, Event ID, Status, Attempts and Error. The Measurement Protocol gives no answer per event, though: a sent row means Google returned a success code, and mistakes in an event’s content are not reported back. So check the data in Google Analytics itself.
After you sign in with Google, the Google Analytics 4 page shows three cards. The check card puts the purchases and revenue Google Analytics 4 recorded over the last 7 full days next to the orders and revenue WeProfit saw, with the share of your orders found. The access card shows the Google account you signed in with and whether it can edit the property. The Search Console card lists the top 10 Google searches that showed your store in the last 28 days, with clicks, impressions, CTR and position, when a Search Console property of the same Google account matches your store’s domain; its data arrives about 2 days late.
To follow one order, place a test purchase, find the order in WeProfit and look for its purchase in Google Analytics, starting with the Realtime report. A Shopify test order counts like a real order: WeProfit sends its purchase to Google Analytics 4, and refunding it sends a refund with the same transaction_id. Google says data processing can take 24 to 48 hours, so give the standard reports time before you compare totals.
Troubleshooting Google Analytics 4 on Shopify
Find the step that broke before you change your setup.
| What you see | What to check |
|---|---|
| Send test passes, but no purchase shows in Google Analytics 4 | Check the Measurement ID, the API secret and that the destination is enabled, then place a real order. The validation test checks the format only and never appears in reports. |
| Visits are counted twice | Another Google Analytics 4 tag still reports to the property next to the tag WeProfit adds. Turn it off, or switch to Keep my own Google Analytics 4 tag. |
| Purchases are counted twice | Your own tag and WeProfit report different transaction IDs. Choose the Order identifier your tag reports: order ID or order number. |
| No page views from your store | With Keep my own Google Analytics 4 tag, WeProfit sends no page views. Check the tag check on the destination card and your own tag. |
| Older orders are missing | Orders placed before WeProfit was installed, including imported history, are never sent. |
| The check card finds fewer purchases than orders | Allow up to 48 hours for Google Analytics to show a purchase, and remember that orders WeProfit never sends, such as POS and draft orders, still count on WeProfit’s side. |