Repository navigation
feat(analytics): follow the app owner's choice and the visitor's consent - #351
Open
Amit-Shvil wants to merge 1 commit into
Open
Amit-Shvil wants to merge 1 commit into
Amit-Shvil wants to merge 1 commit into
Conversation
The server marks published pages with <meta name="base44-analytics">: off never tracks or stores base44_analytics_session_id; consent waits for Google Consent Mode analytics_storage via window.__b44Consent and removes the id on a later denial; on tracks until a denial. No meta: unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
App Analytics follows the app owner's choice and the visitor's consent. Today the SDK writes
base44_analytics_session_id(localStorage, no expiry) and sends analytics on load even when the app's cookie banner declined.The Base44 server marks published pages with
<meta name="base44-analytics">(base44-dev/apper, behind a flag):off/analytics/event, nologUserInAppconsentanalytics_storageis granted (viawindow.__b44Consent, which the server injects); a later denial stops it and removes the idonX-Base44-Anonymous-Id/ the socketanonymous_idstay stable for the tab. It is stored once consent is granted (the same id).analytics-consent), so an older SDK copy on the page that ownsanalyticscan't break it.Release
Please ship as a 0.8.x patch (templates pin
^0.8.54).Tests
tests/unit/analytics-consent.test.ts: no storage write or request before a grant; grant starts, revoke stops and removes the key; off sends nothing; on and no-meta unchanged. 4 of 5 fail without the change. Full suite: 413 passed.🤖 Generated with Claude Code