Connect Google Analytics 4
Send StockSweep clearance events into your own GA4 property using a Measurement ID and API secret you generate yourself.
Show all sections (21)
- Step-by-step
- 1. Find your Measurement ID
- 2. Create a Measurement Protocol API secret
- 3. Enter both in StockSweep
- 4. Confirm the connection
- What success looks like
- What gets sent
- Troubleshooting
- Status shows Degraded immediately after saving
- Events are not appearing in Realtime
- Events appear in Realtime but not in reports
- I connected the wrong property
- FAQ
- Does this send customer personal data to Google?
- Does connecting GA4 change my ROI Dashboard numbers?
- Can I send to more than one GA4 property?
- Is Google Ads connected the same way?
- Related articles
Connecting GA4 puts StockSweep's clearance activity into the same analytics property as the rest of your store, so dead-stock recovery shows up next to everything else rather than living in a separate dashboard.
Estimated time: 6 minutes
What you'll accomplish
- Generate the two credentials GA4 needs
- Connect StockSweep to your GA4 property
- Confirm events are arriving
- Know what is sent and what is not
Requirements
- Plan: Pro or Enterprise.
- Admin access to the GA4 property you want to send events to.
- Found at Settings → Integrations → Google Analytics 4.
Quick checklist
- You know which GA4 property should receive the events
- You have your Measurement ID (format
G-XXXXXXX) - You have created a Measurement Protocol API secret
- You are on Pro or Enterprise
Step-by-step
1. Find your Measurement ID
In Google Analytics, open Admin → Data streams, select your web stream, and copy the Measurement ID. It starts with G- followed by 6–12 characters.
2. Create a Measurement Protocol API secret
On the same data stream page, open Measurement Protocol API secrets and create a new secret. Copy the value — Google shows it in full here, but treat it like a password.
3. Enter both in StockSweep
Open Settings → Integrations → Google Analytics 4, paste the Measurement ID and the API secret, and save.
This is a credentials-based connection, not an OAuth handshake. There is no redirect to Google and no app approval step — which also means there is nothing on our side that has to be provisioned first.
4. Confirm the connection
The connection status should move to Active. If it shows Degraded, the credentials were accepted in format but rejected by Google — recheck that the secret belongs to the same data stream as the Measurement ID.
What success looks like
- The integration page shows Active.
- Events appear in your GA4 property's Realtime report within a few minutes of a clearance action.
- Because GA4 batches, expect standard reports to lag behind Realtime by up to 24 hours. That lag is Google's, not ours.
What gets sent
StockSweep sends clearance and dead-stock events — discounts applied, clearance page activity, recovery events — so you can attribute recovery inside your existing analytics.
Events are sent through Google's Measurement Protocol, in batches of up to 25 events per request. If a send fails transiently, it retries at 10s → 30s → 2m → 10m → 30m before giving up. Delivered dispatch records are kept for 30 days.
Troubleshooting
Status shows Degraded immediately after saving
The Measurement ID and API secret must belong to the same data stream. A secret from a different stream is accepted in format and rejected on use.
Events are not appearing in Realtime
Check the integration status first. If it is Active, confirm you are looking at the right GA4 property — sending to a second, unused property is the most common cause of "nothing is arriving".
Events appear in Realtime but not in reports
Normal. GA4 standard reports can take up to 24 hours to process.
I connected the wrong property
Re-enter the correct Measurement ID and API secret. The new credentials replace the old ones; no disconnect step is needed.
FAQ
Does this send customer personal data to Google?
StockSweep sends product and clearance event data. Do not treat the integration as a route for customer PII.
Does connecting GA4 change my ROI Dashboard numbers?
No. GA4 is an outbound feed. StockSweep's own ROI figures are computed from its attribution ledger, independently — see ROI Dashboard Methodology.
Can I send to more than one GA4 property?
One property per store. To move, replace the credentials.
Is Google Ads connected the same way?
No — Google Ads uses OAuth and app-level API access that is not yet provisioned. See Integrations Overview for its current status.
Related articles
Was this article helpful?
Let us know — your feedback helps us improve our documentation.