feat(analytics-browser): enable event property attribution by default (SDKW-27)#1860
Open
Mercy811 wants to merge 3 commits into
Open
feat(analytics-browser): enable event property attribution by default (SDKW-27)#1860Mercy811 wants to merge 3 commits into
Mercy811 wants to merge 3 commits into
Conversation
Contributor
size-limit report 📦
|
7ff2899 to
63936bf
Compare
… (SDKW-27) Promote event property-based attribution tracking out of the experimental tag and enable it by default in the browser SDK. - Remove the @experimental tags from `trackingMethod` and `fallbackAttributionEvent` in AttributionOptions. - Change the default `trackingMethod` to `["userProperty", "eventProperty"]` so attribution params are attached to event properties automatically, while preserving the existing user-property attribution behavior. - Explicit user configuration is still honored, so users who opted into a specific method keep their behavior (backward compatible). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…_TRACKING_METHODS readonly Address code review on SDKW-27: - Add a browser-client integration test asserting both attribution plugins load when no trackingMethod is configured (the new default path). - Mark DEFAULT_TRACKING_METHODS as readonly to prevent mutation of the shared default array. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eb-attribution tests The web-attribution integration tests cover the user-property (web) attribution flow. Now that event-property attribution is enabled by default, pin trackingMethod to 'userProperty' in these tests' defaultTracking config so the campaign params are not also attached to event properties, keeping the assertions focused on the user-property behavior under test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
63936bf to
082ef49
Compare
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.
Summary
Moves the Browser SDK's event property-based attribution tracking out of the experimental tag and enables it by default, per SDKW-27.
Previously this feature was gated behind an experimental
trackingMethod: 'eventProperty'opt-in. It is now a stable, default-on capability so campaign params are attached to event properties automatically.Changes
trackingMethodandfallbackAttributionEventinAttributionOptions(analytics-core).["userProperty"]to["userProperty", "eventProperty"](normalizeTrackingMethodinanalytics-browser). Extracted into aDEFAULT_TRACKING_METHODSconstant. Both methods run independently and combine.@defaultValuefortrackingMethod.Backward compatibility
Explicit user configuration is still honored. Users who opted into a specific method (e.g.
trackingMethod: 'userProperty'or'eventProperty') keep exactly their configured behavior — the new default only applies when nothing valid is configured. Existing default users keep their user-property attribution and additionally gain event-property attribution.Testing
analytics-browser: 511 tests pass, 100% coverageanalytics-core: 815 tests pass, 100% coverageplugin-event-property-attribution-browser: 12 tests pass, 100% coverage🤖 Generated with Claude Code