Platform ConnectionsGA4

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 counts against your ad platform connection limit.

Configuration (Two Paths)

CleanClicks supports two GA4 connection paths depending on how you started.

Audit-tier customers (signed up via cleanclicks.io/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.

  1. Go to Configuration > Vendors tab
  2. Enable GA4
  3. Enter your Measurement ID (format: G-XXXXXXXXXX)
  4. Enter your API Secret
  5. Save

Finding Your Measurement ID

  1. Go to Google Analytics
  2. Navigate to Admin > Data Streams
  3. Click on your web stream
  4. The Measurement ID is displayed at the top (format: G-XXXXXXXXXX)

Creating a Measurement Protocol API Secret

  1. In the same Data Stream settings, scroll to Measurement Protocol API secrets
  2. Click Create
  3. Give it a name (e.g., "CleanClicks")
  4. 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

  1. Go to Configuration > Advanced tab
  2. Enable GA4 Proxy
  3. 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.

Troubleshooting

IssueSolution
Events not in GA4 RealtimeVerify Measurement ID and API Secret. Events should appear in Realtime within 30 seconds.
Events show as "Unassigned" sourceSession stitching may not have a matching GA4 session. This happens when the visitor had never loaded GA4 client-side.
Demographics not showingEnable "Allow Signals" in Advanced settings. Allow 48 hours for demographic data to populate.
Duplicate eventsIf using WordPress plugin, disable Measurement Protocol for that domain. See note above.

Next: Usermaven