Connecting GA4
Connect GA4 to CleanClicks for server-side event delivery via Measurement Protocol and first-party script proxying.
CleanClicks sends conversion events to Google Analytics 4 via the Measurement Protocol and can proxy your GA4 client-side scripts through your first-party subdomain.
Plan Requirements
GA4 is available on Signal, Clarity, and Command plans.
GA4 is an analytics-layer connection (Signal and up) and does not count against your ad-platform connection limit.
About this GA4 property: CleanClicks uses a dedicated GA4 property, provisioned and operated by CleanClicks on your behalf under service-provider terms, for first-party server-side measurement. It is separate from your own primary GA4 property — your existing GA4 setup keeps running untouched, and CleanClicks never writes into your primary property.
Configuration (Two Paths)
CleanClicks supports two GA4 connection paths depending on how you started.
Audit-tier customers (signed up via cleanclicks.ai/audit) connect GA4 via Google OAuth at the audit signup step. CleanClicks requests analytics.readonly + analytics.edit scopes — read access to compare GA4 sessions against CleanClicks measurements for the audit gap-analysis, and edit access to create the server-side Measurement Protocol API Secret for you when you upgrade to a paid plan. See Privacy Policy §2.3 for the full scope disclosure.
Paid-tier customers (Signal+ direct signup) configure GA4 via API key entry on the dashboard — no OAuth required for the standard Measurement Protocol path.
- Go to Configuration > Vendors tab
- Enable GA4
- Enter your Measurement ID (format:
G-XXXXXXXXXX) - Enter your API Secret
- Save
Finding Your Measurement ID
- Go to Google Analytics
- Navigate to Admin > Data Streams
- Click on your web stream
- The Measurement ID is displayed at the top (format:
G-XXXXXXXXXX)
Creating a Measurement Protocol API Secret
- In the same Data Stream settings, scroll to Measurement Protocol API secrets
- Click Create
- Give it a name (e.g., "CleanClicks")
- Copy the generated secret value
Server-Side Events (Measurement Protocol)
With GA4 configured, CleanClicks sends conversion events to GA4 via the Measurement Protocol. This means:
- Conversions arrive in GA4 even if the visitor had an ad blocker
- Events include proper session attribution (session stitching)
- Geographic data from the visitor's original session is preserved
Session Stitching
CleanClicks automatically links server-side events to existing GA4 sessions. When a visitor converts, the event is attributed to the GA4 session that started during the same visit, not a new orphaned session. This prevents the "Unassigned" traffic source problem common with basic Measurement Protocol implementations.
GA4 First-Party Proxy (Signal+)
Beyond server-side events, CleanClicks can proxy your entire GA4 client-side tracking through your first-party subdomain.
Enabling the Proxy
- Go to Configuration > Advanced tab
- Enable GA4 Proxy
- Save
With the proxy enabled, your GA4 collection requests flow through cleanclicks.yourdomain.com instead of Google's domains. Benefits:
- Ad blockers bypass. Requests to your own subdomain aren't blocked.
- Full cookie lifetime. No ITP restrictions on first-party cookies.
- Demographic signals preserved (if Allow Signals is enabled)
Allow Signals (Demographics)
When using the GA4 proxy, an Allow Signals toggle controls whether Google's demographic data collection is preserved:
- On: Age, gender, and interests data flows to GA4. You see demographics in reports.
- Off: Maximum privacy. Demographics are stripped. Default.
Important: Platform-Specific MP Guidance
WordPress (plugin-based sites): the CleanClicks WordPress plugin handles GA4 integration client-side via the proxied gtag.js + dataLayer. Do not also enable Measurement Protocol against your primary GA4 property, as this creates duplicate events in GA4 attributed to "Unassigned" sessions. The plugin + GA4 First-Party Proxy combination gives you full ad-blocker bypass without needing Measurement Protocol.
Shopify v2.1.0+ Custom Pixel: the Custom Pixel sends GA4 purchase events client-side via Measurement Protocol routed through the /__cc/g/mp proxy endpoint, using your visitor's real _ga session cookie for proper attribution. Disable the GA4 Measurement Protocol toggle in this vendor tab if you're using the v2.1.0+ pixel. Configure the Measurement ID + API Secret here (the pixel code generator reads them) — just leave the MP dispatch toggle off.
Shopify pre-v2.1.0 (legacy): server-side MP is the only way to get GA4 purchase events into Shopify since the legacy pixel can't fire client-side MP. Keep MP enabled, accept "Unassigned" attribution as a known tradeoff, and upgrade to the v2.1.0+ pixel to flip MP off and recover proper attribution.
Summary: WordPress → MP OFF · Shopify v2.1.0+ → MP OFF · Shopify legacy → MP ON.
Recommended GA4 settings
Set these on the GA4 side so the data CleanClicks delivers is retained and reportable:
| Setting | Recommended | Where | Why |
|---|---|---|---|
| Data retention | 14 months (the maximum on standard GA4) | Admin > Data Settings > Data Retention | The default is 2 months; explorations silently lose history beyond the retention window |
| Reset user data on new activity | On | Same screen | Keeps returning-visitor history alive |
| Internal traffic filter | Define + activate for your office/VPN IPs | Admin > Data Streams > Configure tag settings > Define internal traffic | Keeps your own team out of the recovered numbers |
| Timezone + currency | Match your commerce platform | Admin > Property Settings | Prevents day-boundary and revenue mismatches when you reconcile against store totals |
| Key events | Mark the events CleanClicks sends (e.g. purchase) as key events | Admin > Events | Key-event marking is what makes them count as conversions in reports |
| Google Signals | Optional — pair with the Allow Signals proxy toggle | Admin > Data Settings > Data Collection | If Signals is on in GA4 but Allow Signals is off in CleanClicks, demographics stay empty by design |
Troubleshooting
| Issue | Solution |
|---|---|
| Events not in GA4 Realtime | Verify Measurement ID and API Secret. Events should appear in Realtime within 30 seconds. |
| Events show as "Unassigned" source | Session stitching may not have a matching GA4 session. This happens when the visitor had never loaded GA4 client-side. |
| Demographics not showing | Enable "Allow Signals" in Advanced settings. Allow 48 hours for demographic data to populate. |
| Duplicate events | If using WordPress plugin, disable Measurement Protocol for that domain. See note above. |
Next: Usermaven