Repository navigation
fix(analytics): preserve attribution and relay embedded Brain events - #359
Merged
Merged
Conversation
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.
Embedded Brain activity stops following the Desktop user after
module_open: child-frame events use an independent analytics context, and both entry redirects discardsea_attrandconsent_token.Preserve the two marketing parameters across
/and/deployredirects and capture them during SDK bootstrap. Queue early embedded events until Desktop reports its optionalfeatures.analyticscapability, then relay custom events through the existingrunEvents("trackAnalyticsEvent", payload)API. Standalone Brain and older Desktop deployments retain the existing GTM transport. Once Desktop owns delivery, acknowledgement failures do not also send through iframe GTM.The companion Desktop change supplies the canonical UUID and attribution through the parent analytics context. Deploy Desktop first for immediate continuity; this PR can still merge independently because capability negotiation preserves the older-host behavior. No SDK package update, database migration, or GTM publication is required for the embedded flow.
Validation:
bun checkandbun typecheckfrom the repository root.bun testfromapps/ui).Companion Desktop PR: labring/sealos#7356.