Growth Analytics and Attribution
Last verified: 2026-09-02
This document is the operator-facing map for CaseSolo's public-site measurement stack. It covers Google Tag Manager, GA4, consent, the event contract, and the prepared Google Ads integration. Product analytics inside the authenticated app is separate.
Production assets
| Product | Asset | Identifier | Status | | --- | --- | --- | --- | | Google Tag Manager | casesolo.com web container | GTM-TN627C44 | Published, version 2 | | Google Analytics 4 | CaseSolo property | properties/552521246 | Active | | GA4 web stream | CaseSolo Web | properties/552521246/dataStreams/15629619123 | Active | | GA4 measurement | Web measurement ID | G-MC3GBPFN9H | Active through GTM | | Google Ads | CaseSolo account | 334-986-6423 | Account created; no campaign or spend |
The GA4-to-Google Ads product link has been configured and reviewed but has not been submitted. Current intended link settings are auto-tagging on, personalized advertising off, and Google Ads access to modify Analytics off. The final submit and conversion import remain human-confirmed external actions.
Runtime ownership
src/components/analytics/google-tag.tsxowns the GTM bootstrap and noscriptsrc/components/analytics/analytics-consent.tsxowns the privacy control,src/lib/marketing/gtag.tsowns the non-PII event helpers.src/app/layout.tsxmounts the analytics components once at the applicationsrc/proxy.tspermits the required Google tag endpoints in the production- Production reads
NEXT_PUBLIC_GTM_IDfrom the hostssh environment. Secret
iframe. Do not add a second direct GA4 loader.
Consent Mode v2 state, and Global Privacy Control behavior.
root.
Content Security Policy.
values and the full environment file must never be copied into documentation.
Implementation shipped in 99310125 (fix(analytics): launch CaseSolo GA4 through GTM). Production verification was recorded in 14e39901.
Consent and privacy contract
Consent Mode v2 begins with analytics_storage, ad_storage, ad_user_data, and ad_personalization denied. A visitor may grant analytics storage from the site's privacy panel; advertising consent remains denied. Global Privacy Control forces analytics storage off.
Never send names, email addresses, phone numbers, claim tokens, reference numbers, free-text case narratives, document contents, or other claimant data to GTM, GA4, or Google Ads.
First-touch gclid / gbraid / wbraid / fbclid and UTM tags are captured in the browser tab and stored on the inquiry as metadata.attribution for the future Google Ads offline loop. They are not event parameters.
Event contract
| Event | Meaning | GA4 key event | Google Ads intent | | --- | --- | --- | --- | | generate_lead | Server accepted and stored a qualifier or intake-chat submission | Yes | Secondary/raw demand observation | | qualify_lead | OTP confirmation succeeded | Yes | Primary bidding conversion after import | | sign_up | Attorney exchange registration and onboarding succeeded. Carries the frozen first-touch event_id (code on origin; live after the next hostssh cutover). | Yes | Secondary/supply-side observation | | qualifier_step | Qualifier progression | No | Do not import | | qualifier_abandon_risk | In-progress qualifier is unloading | No | Do not import | | intake_chat_start / intake_chat_phase | Chat funnel start or phase change | No | Do not import | | claim_view / claim_start / claim_convert | Directory claim milestones | No | Observe in GA4; import only after a separate acquisition decision |
Event parameters must remain categorical and non-PII. The current custom dimensions are lead_type, case_type, incident_state, and signup_type.
Verified production behavior
- The live response permits Google Tag Manager in the Content Security Policy.
- Live HTML contains the GTM bootstrap and no duplicate direct GA4 owner.
- Before analytics consent, the browser held no
_ga*cookie. - After analytics consent, the browser created the GA cookie and GA4 collection
- GTM version 2 contains the Google tag, GA4 event forwarder, Conversion Linker,
- GA4 marks
generate_lead,qualify_lead, andsign_upas key events and has
requests returned HTTP 204.
and anchored custom-event allowlist.
the four event-scoped custom dimensions listed above.
Detailed evidence and the remaining external-account work are in planning/evidence/casesolo-growth-analytics-2026-09-02.md and planning/CASESOLO_ANALYTICS.md.
Remaining operator workflow
- Confirm the final GA4-to-Google Ads link submission for CaseSolo account
- Verify the account appears under GA4 Admin > Product links > Google Ads links.
- In Google Ads, import
qualify_lead,generate_lead, andsign_upfrom the - Set
qualify_leadas the primary bidding conversion. Keepgenerate_lead - Run a controlled test lead and confirm one event per milestone in GA4 and
334-986-6423.
CaseSolo GA4 property.
and sign_up secondary until there is enough clean conversion volume to justify a different campaign objective.
Google Ads diagnostics without using real claimant PII.
Do not finish Google Ads billing, submit a payment authorization, create a campaign, set a budget, or enable spend as part of this workflow.