Skip to content

Analytics: Allow or Decline at launch, sync needs Allow - #5

Merged
dukobpa3 merged 6 commits into
mainfrom
analytics-anon-consent
Oct 21, 2026
Merged

dukobpa3 merged 6 commits into
mainfrom
analytics-anon-consent

Conversation

@dukobpa3

@dukobpa3 dukobpa3 commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Apps (PWA, iOS, Android). A normal startup popup, Allow or Decline.

  • Allow: everything as before, plus usage statistics with an identifier and syncing. The choice is stored (the analyticsConsent flag), so the popup does not come back.
  • Decline: the app works the same and saves the archive and settings on the device as before. Only anonymous counts are sent: Google Analytics in Consent Mode, no cookies, no client or app instance ID. The choice is not remembered, so the popup is asked again at the next launch.
  • Sync needs Allow: tapping sync without it opens the same popup with an extra line ("Syncing needs usage statistics to be allowed"). Allow carries straight on into the Google sign-in; Decline does nothing.
  • Events: app_open per launch and a new app_hidden with engaged_s (seconds in the app). Every event carries consent: granted|denied (register it in GA4 as an event-scoped custom dimension).
  • Native: FirebaseAnalytics.setConsent, and Info.plist / AndroidManifest.xml default every analytics consent type to denied so the SDK starts anonymous before JS runs. No change to storage or SQLite.

Verified in a browser (web): the popup opens at launch; Decline leaves no cookies and no stored choice, data is saved to localStorage regardless, and the popup returns on the next launch; tapping sync without Allow opens the popup with the sync line, Decline does nothing, Allow stores the choice, sets the cookies and continues into sign-in; after Allow the popup does not return and the data is intact. svelte-check clean. (The browser pane here never fires a dialog's close event, so I dispatched it by hand to emulate real browsers.)

Needs a device: that the native SDK really starts anonymous (TestFlight / Android + GA4 DebugView), and the new GOOGLE_ANALYTICS_DEFAULT_ALLOW_* / google_analytics_default_allow_* keys. Also the App Privacy answers in App Store Connect.

  • The privacy text is in the landing PR (diary#4): merge it with this one.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T19:25:53.750846Z 210adfc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 210adfc05b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread App/src/routes/+layout.svelte Resolved
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dukobpa3 dukobpa3 changed the title Analytics: anonymous by default, identifiers only with consent Analytics: anonymous by default, identifiers when signed in for sync Oct 21, 2026
…e path

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dukobpa3 dukobpa3 changed the title Analytics: anonymous by default, identifiers when signed in for sync Analytics: mandatory startup popup, anonymous before the click Oct 21, 2026
…d, not even locally)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dukobpa3 dukobpa3 changed the title Analytics: mandatory startup popup, anonymous before the click Allow or decline at startup: session-only without Allow Oct 21, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dukobpa3 dukobpa3 changed the title Allow or decline at startup: session-only without Allow Analytics: Allow or Decline at launch, sync needs Allow Oct 21, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dukobpa3
dukobpa3 merged commit f449470 into main Oct 21, 2026
1 check passed
@dukobpa3
dukobpa3 deleted the analytics-anon-consent branch October 21, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant