@metamask-previews/analytics-controller 3.0.0-preview-f67925e6c → 3.1.0-preview-9324e33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.1.0]
11
+
12
+ ### Added
13
+
14
+ - Add independent marketing consent and purpose-aware event classification ([#10232](https://github.com/MetaMask/core/pull/10232))
15
+ - Adds `optedInToMarketing`, `optInToMarketing` / `optOutOfMarketing` / `resetMarketingConsentDecision`, and a persisted `eventsConfig` whose unlisted events default to product-only
16
+ - Named `track` and `view` payloads are delivered once with their allowed purposes in `context.consent.categoryPreferences` and their capture-time config version in `context.eventsConfigVersion`
17
+ - Queues and fragments retain capture-time purpose classification so config changes cannot reclassify captured events. Mixed-purpose fragments classify each declared lifecycle event independently
18
+
10
19
  ### Changed
11
20
 
12
21
  - Bump `uuid` from `^8.3.2` to `^11.1.1` ([#10117](https://github.com/MetaMask/core/pull/10117), [#10243](https://github.com/MetaMask/core/pull/10243))
@@ -96,7 +105,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
96
105
 
97
106
  - Initial release of @metamask/analytics-controller. ([#7017](https://github.com/MetaMask/core/pull/7017), [#7202](https://github.com/MetaMask/core/pull/7202))
98
107
 
99
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/analytics-controller@3.0.0...HEAD
108
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/analytics-controller@3.1.0...HEAD
109
+ [3.1.0]: https://github.com/MetaMask/core/compare/@metamask/analytics-controller@3.0.0...@metamask/analytics-controller@3.1.0
100
110
  [3.0.0]: https://github.com/MetaMask/core/compare/@metamask/analytics-controller@2.1.0...@metamask/analytics-controller@3.0.0
101
111
  [2.1.0]: https://github.com/MetaMask/core/compare/@metamask/analytics-controller@2.0.0...@metamask/analytics-controller@2.1.0
102
112
  [2.0.0]: https://github.com/MetaMask/core/compare/@metamask/analytics-controller@1.2.1...@metamask/analytics-controller@2.0.0
package/README.md CHANGED
@@ -16,12 +16,16 @@ The AnalyticsController provides a unified interface for tracking analytics even
16
16
 
17
17
  ## State
18
18
 
19
- | Field | Type | Description | Persisted |
20
- | ---------------- | --------- | --------------------------------------------- | --------- |
21
- | `analyticsId` | `string` | UUIDv4 identifier (client platform-generated) | Yes |
22
- | `optedIn` | `boolean` | User opt-in status | Yes |
23
- | `eventQueue` | `object` | Optional persisted delivery queue | Yes |
24
- | `eventFragments` | `object` | Optional in-progress event fragments | Yes |
19
+ | Field | Type | Description | Persisted |
20
+ | ------------------------------ | ----------------------- | ------------------------------------------------------------------- | --------- |
21
+ | `analyticsId` | `string` | UUIDv4 identifier (client platform-generated) | Yes |
22
+ | `optedIn` | `boolean` | Product analytics opt-in status | Yes |
23
+ | `consentDecisionMade` | `boolean` | Whether a product consent decision has been made | Yes |
24
+ | `optedInToMarketing` | `boolean` | Marketing analytics opt-in status | Yes |
25
+ | `marketingConsentDecisionMade` | `boolean` | Whether a marketing consent decision has been made | Yes |
26
+ | `eventsConfig` | `AnalyticsEventsConfig` | Cached event-purpose classification and its config registry version | Yes |
27
+ | `eventQueue` | `object` | Optional persisted delivery queue | Yes |
28
+ | `eventFragments` | `object` | Optional in-progress event fragments | Yes |
25
29
 
26
30
  ### Client Platform Responsibilities
27
31
 
@@ -30,6 +34,30 @@ The AnalyticsController provides a unified interface for tracking analytics even
30
34
  3. **Subscribe to state changes**: Persist changes to isolated storage
31
35
  4. **Persist to isolated storage**: Keep analytics settings separate from main state (protects against state corruption)
32
36
 
37
+ `eventsConfig.events` maps event names to one or both `AnalyticsPurpose` values (`product` and `marketing`). Unlisted names default to product-only. Phase 1 uses the config already persisted in state. Loading it from config registry will be added later.
38
+
39
+ Each `track` and `view` payload is emitted once when at least one eligible purpose is opted in. A dual-purpose event is still emitted once when both consents are enabled. Its allowed purposes are stamped using Segment's consent context:
40
+
41
+ ```json
42
+ {
43
+ "context": {
44
+ "consent": {
45
+ "categoryPreferences": {
46
+ "product": true,
47
+ "marketing": true
48
+ }
49
+ },
50
+ "eventsConfigVersion": "a1b2c3d"
51
+ }
52
+ }
53
+ ```
54
+
55
+ The booleans are the intersection of event classification and current user consent. `eventsConfigVersion` is included when classification came from a persisted config. `identify` is always product-only.
56
+
57
+ Classification and config version are captured with queued events and fragments. A later config update cannot reclassify an event that was already captured. If one purpose is opted in while another is undecided, a dual-purpose event is sent immediately for the allowed purpose and is not replayed after the second decision.
58
+
59
+ Event properties are unchanged by purpose consent.
60
+
33
61
  ## Anonymous Events Feature
34
62
 
35
63
  When `isAnonymousEventsFeatureEnabled` is enabled in the constructor, events with sensitive properties are split into separate events:
@@ -79,11 +107,11 @@ controller.finalizeEventFragment(`signature-${requestId}`);
79
107
 
80
108
  Use `upsertEventFragment` when a contributor cannot know whether the journey has been started yet. It merges into an existing fragment, or creates a property bag when none exists.
81
109
 
82
- Emission goes through `trackEvent`, so consent gating, anonymous event splitting, the pre-consent queue and geolocation enrichment all apply to a fragment's events exactly as they do to a direct call.
110
+ Emission uses the same consent gating, anonymous event splitting, pre-consent queue and geolocation enrichment as a direct `trackEvent` call. Each declared lifecycle event keeps its own capture-time purposes. A fragment can therefore combine product-only and marketing-only lifecycle events without reclassifying the whole journey.
83
111
 
84
112
  The consent gate also applies to accumulation, not just to emission, so a fragment never stores data for an event that could not be delivered. A fragment only holds data while the user is opted in, or while they are still undecided and `isPreConsentQueueEnabled` is holding their events until they decide. In any other consent state, and in particular after an explicit opt-out, every fragment method is a logged no-op.
85
113
 
86
- Fragments are removed when they are finalized, deleted, or when the user opts out. `resetConsentDecision` keeps them only while the now-undecided user can still accumulate them. On `init`, any fragment that did not set `persist: true` is discarded, since the journey it belonged to cannot be resumed. Persistent fragments that have not been written to for longer than `EVENT_FRAGMENT_MAX_AGE` (24 hours, measured from `lastUpdated`) are also discarded, so abandoned journeys cannot keep `properties` or `sensitiveProperties` in storage indefinitely. All fragments are discarded when the consent state no longer allows accumulation. Nothing is emitted for a discarded fragment: a journey that never reached its own finalization is unfinished, not failed.
114
+ Fragments are removed when they are finalized, deleted, or when no eligible purpose remains allowed or undecided. Opting out of one purpose retains a dual-purpose fragment when another purpose still permits capture. `resetConsentDecision` keeps fragments only while the now-undecided user can still accumulate them. On `init`, any fragment that did not set `persist: true` is discarded, since the journey it belonged to cannot be resumed. Persistent fragments that have not been written to for longer than `EVENT_FRAGMENT_MAX_AGE` (24 hours, measured from `lastUpdated`) are also discarded, so abandoned journeys cannot keep `properties` or `sensitiveProperties` in storage indefinitely. Nothing is emitted for a discarded fragment: a journey that never reached its own finalization is unfinished, not failed.
87
115
 
88
116
  This feature is disabled by default. When disabled, every fragment method is a logged no-op and no fragment is written to state.
89
117
 
@@ -178,8 +178,38 @@ export type AnalyticsControllerResetConsentDecisionAction = {
178
178
  type: `AnalyticsController:resetConsentDecision`;
179
179
  handler: AnalyticsController['resetConsentDecision'];
180
180
  };
181
+ /**
182
+ * Opt in to marketing analytics.
183
+ *
184
+ * Independent of {@link optIn}. Replays queued marketing events.
185
+ *
186
+ * @returns A promise that resolves once opt-in processing has completed.
187
+ */
188
+ export type AnalyticsControllerOptInToMarketingAction = {
189
+ type: `AnalyticsController:optInToMarketing`;
190
+ handler: AnalyticsController['optInToMarketing'];
191
+ };
192
+ /**
193
+ * Opt out of marketing analytics.
194
+ *
195
+ * Independent of {@link optOut}. Discards queued marketing events and
196
+ * marketing event fragments.
197
+ */
198
+ export type AnalyticsControllerOptOutOfMarketingAction = {
199
+ type: `AnalyticsController:optOutOfMarketing`;
200
+ handler: AnalyticsController['optOutOfMarketing'];
201
+ };
202
+ /**
203
+ * Reset the marketing consent decision back to undecided.
204
+ *
205
+ * Independent of {@link resetConsentDecision}.
206
+ */
207
+ export type AnalyticsControllerResetMarketingConsentDecisionAction = {
208
+ type: `AnalyticsController:resetMarketingConsentDecision`;
209
+ handler: AnalyticsController['resetMarketingConsentDecision'];
210
+ };
181
211
  /**
182
212
  * Union of all AnalyticsController action types.
183
213
  */
184
- export type AnalyticsControllerMethodActions = AnalyticsControllerTrackEventAction | AnalyticsControllerIdentifyAction | AnalyticsControllerTrackViewAction | AnalyticsControllerCreateEventFragmentAction | AnalyticsControllerUpsertEventFragmentAction | AnalyticsControllerUpdateEventFragmentAction | AnalyticsControllerGetEventFragmentByIdAction | AnalyticsControllerDeleteEventFragmentAction | AnalyticsControllerFinalizeEventFragmentAction | AnalyticsControllerOptInAction | AnalyticsControllerOptOutAction | AnalyticsControllerResetConsentDecisionAction;
214
+ export type AnalyticsControllerMethodActions = AnalyticsControllerTrackEventAction | AnalyticsControllerIdentifyAction | AnalyticsControllerTrackViewAction | AnalyticsControllerCreateEventFragmentAction | AnalyticsControllerUpsertEventFragmentAction | AnalyticsControllerUpdateEventFragmentAction | AnalyticsControllerGetEventFragmentByIdAction | AnalyticsControllerDeleteEventFragmentAction | AnalyticsControllerFinalizeEventFragmentAction | AnalyticsControllerOptInAction | AnalyticsControllerOptOutAction | AnalyticsControllerResetConsentDecisionAction | AnalyticsControllerOptInToMarketingAction | AnalyticsControllerOptOutOfMarketingAction | AnalyticsControllerResetMarketingConsentDecisionAction;
185
215
  //# sourceMappingURL=AnalyticsController-method-action-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsController-method-action-types.d.ts","sourceRoot":"","sources":["../src/AnalyticsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAA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O,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gCAAgC,GACxC,mCAAmC,GACnC,iCAAiC,GACjC,kCAAkC,GAClC,4CAA4C,GAC5C,4CAA4C,GAC5C,4CAA4C,GAC5C,6CAA6C,GAC7C,4CAA4C,GAC5C,8CAA8C,GAC9C,8BAA8B,GAC9B,+BAA+B,GAC/B,6CAA6C,CAAC"}
1
+ {"version":3,"file":"AnalyticsController-method-action-types.d.ts","sourceRoot":"","sources":["../src/AnalyticsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;A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;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;CACtD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,sCAAsC,CAAC;IAC7C,OAAO,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,0CAA0C,GAAG;IACvD,IAAI,EAAE,uCAAuC,CAAC;IAC9C,OAAO,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;CACnD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,mDAAmD,CAAC;IAC1D,OAAO,EAAE,mBAAmB,CAAC,+BAA+B,CAAC,CAAC;CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gCAAgC,GACxC,mCAAmC,GACnC,iCAAiC,GACjC,kCAAkC,GAClC,4CAA4C,GAC5C,4CAA4C,GAC5C,4CAA4C,GAC5C,6CAA6C,GAC7C,4CAA4C,GAC5C,8CAA8C,GAC9C,8BAA8B,GAC9B,+BAA+B,GAC/B,6CAA6C,GAC7C,yCAAyC,GACzC,0CAA0C,GAC1C,sDAAsD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsController-method-action-types.js","sourceRoot":"","sources":["../src/AnalyticsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AnalyticsController } from './AnalyticsController.js';\n\n/**\n * Track an analytics event.\n *\n * Events are only tracked if analytics is enabled.\n *\n * @param event - Analytics event with properties and sensitive properties\n * @param context - Optional platform-specific context forwarded to the platform adapter.\n */\nexport type AnalyticsControllerTrackEventAction = {\n type: `AnalyticsController:trackEvent`;\n handler: AnalyticsController['trackEvent'];\n};\n\n/**\n * Identify a user for analytics.\n *\n * @param traits - User traits/properties\n * @param context - Optional platform-specific context forwarded to the platform adapter.\n */\nexport type AnalyticsControllerIdentifyAction = {\n type: `AnalyticsController:identify`;\n handler: AnalyticsController['identify'];\n};\n\n/**\n * Track a page or screen view.\n *\n * @param name - The identifier/name of the page or screen being viewed (e.g., \"home\", \"settings\", \"wallet\")\n * @param properties - Optional properties associated with the view\n * @param context - Optional platform-specific context forwarded to the platform adapter.\n */\nexport type AnalyticsControllerTrackViewAction = {\n type: `AnalyticsController:trackView`;\n handler: AnalyticsController['trackView'];\n};\n\n/**\n * Create an event fragment.\n *\n * A fragment accumulates properties across a user journey so that several\n * parts of a client can contribute to the same set of events without\n * re-deriving them. Declaring `successEvent` and `failureEvent` turns the\n * fragment into a funnel that {@link finalizeEventFragment} closes. Declaring\n * none of the event names makes it a pure property bag that the client reads\n * back with {@link getEventFragmentById} when it emits its own events.\n *\n * Any existing fragment with the same ID is replaced, so a new journey never\n * inherits properties from a stale one.\n *\n * Nothing is created unless the user is opted in, or undecided with the\n * pre-consent queue enabled, so an opted-out user accumulates no fragment\n * data.\n *\n * @param options - The fragment definition. An ID is generated when one is\n * not supplied.\n * @returns A read-only copy of the created fragment, or `undefined` when the\n * event fragments feature is disabled or the consent state does not allow\n * capture. Mutating the returned object does not change controller state.\n * Use {@link updateEventFragment} or {@link upsertEventFragment} to write.\n */\nexport type AnalyticsControllerCreateEventFragmentAction = {\n type: `AnalyticsController:createEventFragment`;\n handler: AnalyticsController['createEventFragment'];\n};\n\n/**\n * Write to an event fragment, creating a property bag if none exists.\n *\n * This is the ergonomic entry point for contributors that do not know\n * whether the journey has been started yet, and it avoids the read then\n * write race a caller would otherwise have to implement itself.\n *\n * @param id - The fragment ID.\n * @param payload - The properties and context to merge in.\n */\nexport type AnalyticsControllerUpsertEventFragmentAction = {\n type: `AnalyticsController:upsertEventFragment`;\n handler: AnalyticsController['upsertEventFragment'];\n};\n\n/**\n * Write to an existing event fragment.\n *\n * @param id - The fragment ID.\n * @param payload - The properties and context to merge in.\n * @throws Error if no fragment has that ID when the call is not ignored.\n * Use {@link upsertEventFragment} when the fragment may not exist yet.\n * When the event fragments feature is disabled or the consent state does not\n * allow capture, the call is a logged no-op and does not throw.\n */\nexport type AnalyticsControllerUpdateEventFragmentAction = {\n type: `AnalyticsController:updateEventFragment`;\n handler: AnalyticsController['updateEventFragment'];\n};\n\n/**\n * Read an event fragment.\n *\n * @param id - The fragment ID.\n * @returns A read-only copy of the fragment, or `undefined` when no fragment\n * has that ID, the event fragments feature is disabled, or the consent state\n * does not allow capture. Mutating the returned object does not change\n * controller state. Use {@link updateEventFragment} or\n * {@link upsertEventFragment} to write.\n */\nexport type AnalyticsControllerGetEventFragmentByIdAction = {\n type: `AnalyticsController:getEventFragmentById`;\n handler: AnalyticsController['getEventFragmentById'];\n};\n\n/**\n * Discard an event fragment without emitting anything.\n *\n * @param id - The fragment ID.\n */\nexport type AnalyticsControllerDeleteEventFragmentAction = {\n type: `AnalyticsController:deleteEventFragment`;\n handler: AnalyticsController['deleteEventFragment'];\n};\n\n/**\n * Close an event fragment, emitting its closing event and discarding it.\n *\n * The event emitted is `failureEvent` when the journey was abandoned and\n * `successEvent` otherwise. A fragment that does not declare the relevant\n * event name is discarded silently, which is what makes a pure property bag\n * possible.\n *\n * @param id - The fragment ID.\n * @param options - Finalization options.\n * @param options.abandoned - Whether the journey was abandoned.\n * @param options.context - Context merged over the fragment's own context.\n * @throws Error if no fragment has that ID when the call is not ignored.\n * When the event fragments feature is disabled or the consent state does not\n * allow capture, the call is a logged no-op and does not throw.\n */\nexport type AnalyticsControllerFinalizeEventFragmentAction = {\n type: `AnalyticsController:finalizeEventFragment`;\n handler: AnalyticsController['finalizeEventFragment'];\n};\n\n/**\n * Opt in to analytics.\n *\n * Records that a consent decision has been made and replays any events that\n * were queued while the user was undecided.\n *\n * When geolocation enrichment is enabled, geolocation is resolved here (once\n * the user has consented) and awaited before the queued events are replayed,\n * so those events are enriched with the resolved location as they are sent.\n *\n * @returns A promise that resolves once opt-in processing has completed.\n */\nexport type AnalyticsControllerOptInAction = {\n type: `AnalyticsController:optIn`;\n handler: AnalyticsController['optIn'];\n};\n\n/**\n * Opt out of analytics.\n *\n * Records that a consent decision has been made and discards any persisted\n * events and in-progress event fragments so nothing captured before the\n * decision is ever delivered.\n */\nexport type AnalyticsControllerOptOutAction = {\n type: `AnalyticsController:optOut`;\n handler: AnalyticsController['optOut'];\n};\n\n/**\n * Reset the consent decision back to undecided.\n *\n * Intended for client flows that restart onboarding. Clears the opt-in\n * preference and discards the delivery queue, but preserves any pre-consent\n * events so they can still be replayed if the user opts in again. The user is\n * treated as undecided again.\n *\n * In-progress event fragments are kept only while the undecided user can\n * still accumulate them, and discarded otherwise, so no fragment outlives the\n * consent state that allowed it.\n */\nexport type AnalyticsControllerResetConsentDecisionAction = {\n type: `AnalyticsController:resetConsentDecision`;\n handler: AnalyticsController['resetConsentDecision'];\n};\n\n/**\n * Union of all AnalyticsController action types.\n */\nexport type AnalyticsControllerMethodActions =\n | AnalyticsControllerTrackEventAction\n | AnalyticsControllerIdentifyAction\n | AnalyticsControllerTrackViewAction\n | AnalyticsControllerCreateEventFragmentAction\n | AnalyticsControllerUpsertEventFragmentAction\n | AnalyticsControllerUpdateEventFragmentAction\n | AnalyticsControllerGetEventFragmentByIdAction\n | AnalyticsControllerDeleteEventFragmentAction\n | AnalyticsControllerFinalizeEventFragmentAction\n | AnalyticsControllerOptInAction\n | AnalyticsControllerOptOutAction\n | AnalyticsControllerResetConsentDecisionAction;\n"]}
1
+ {"version":3,"file":"AnalyticsController-method-action-types.js","sourceRoot":"","sources":["../src/AnalyticsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AnalyticsController } from './AnalyticsController.js';\n\n/**\n * Track an analytics event.\n *\n * Events are only tracked if analytics is enabled.\n *\n * @param event - Analytics event with properties and sensitive properties\n * @param context - Optional platform-specific context forwarded to the platform adapter.\n */\nexport type AnalyticsControllerTrackEventAction = {\n type: `AnalyticsController:trackEvent`;\n handler: AnalyticsController['trackEvent'];\n};\n\n/**\n * Identify a user for analytics.\n *\n * @param traits - User traits/properties\n * @param context - Optional platform-specific context forwarded to the platform adapter.\n */\nexport type AnalyticsControllerIdentifyAction = {\n type: `AnalyticsController:identify`;\n handler: AnalyticsController['identify'];\n};\n\n/**\n * Track a page or screen view.\n *\n * @param name - The identifier/name of the page or screen being viewed (e.g., \"home\", \"settings\", \"wallet\")\n * @param properties - Optional properties associated with the view\n * @param context - Optional platform-specific context forwarded to the platform adapter.\n */\nexport type AnalyticsControllerTrackViewAction = {\n type: `AnalyticsController:trackView`;\n handler: AnalyticsController['trackView'];\n};\n\n/**\n * Create an event fragment.\n *\n * A fragment accumulates properties across a user journey so that several\n * parts of a client can contribute to the same set of events without\n * re-deriving them. Declaring `successEvent` and `failureEvent` turns the\n * fragment into a funnel that {@link finalizeEventFragment} closes. Declaring\n * none of the event names makes it a pure property bag that the client reads\n * back with {@link getEventFragmentById} when it emits its own events.\n *\n * Any existing fragment with the same ID is replaced, so a new journey never\n * inherits properties from a stale one.\n *\n * Nothing is created unless the user is opted in, or undecided with the\n * pre-consent queue enabled, so an opted-out user accumulates no fragment\n * data.\n *\n * @param options - The fragment definition. An ID is generated when one is\n * not supplied.\n * @returns A read-only copy of the created fragment, or `undefined` when the\n * event fragments feature is disabled or the consent state does not allow\n * capture. Mutating the returned object does not change controller state.\n * Use {@link updateEventFragment} or {@link upsertEventFragment} to write.\n */\nexport type AnalyticsControllerCreateEventFragmentAction = {\n type: `AnalyticsController:createEventFragment`;\n handler: AnalyticsController['createEventFragment'];\n};\n\n/**\n * Write to an event fragment, creating a property bag if none exists.\n *\n * This is the ergonomic entry point for contributors that do not know\n * whether the journey has been started yet, and it avoids the read then\n * write race a caller would otherwise have to implement itself.\n *\n * @param id - The fragment ID.\n * @param payload - The properties and context to merge in.\n */\nexport type AnalyticsControllerUpsertEventFragmentAction = {\n type: `AnalyticsController:upsertEventFragment`;\n handler: AnalyticsController['upsertEventFragment'];\n};\n\n/**\n * Write to an existing event fragment.\n *\n * @param id - The fragment ID.\n * @param payload - The properties and context to merge in.\n * @throws Error if no fragment has that ID when the call is not ignored.\n * Use {@link upsertEventFragment} when the fragment may not exist yet.\n * When the event fragments feature is disabled or the consent state does not\n * allow capture, the call is a logged no-op and does not throw.\n */\nexport type AnalyticsControllerUpdateEventFragmentAction = {\n type: `AnalyticsController:updateEventFragment`;\n handler: AnalyticsController['updateEventFragment'];\n};\n\n/**\n * Read an event fragment.\n *\n * @param id - The fragment ID.\n * @returns A read-only copy of the fragment, or `undefined` when no fragment\n * has that ID, the event fragments feature is disabled, or the consent state\n * does not allow capture. Mutating the returned object does not change\n * controller state. Use {@link updateEventFragment} or\n * {@link upsertEventFragment} to write.\n */\nexport type AnalyticsControllerGetEventFragmentByIdAction = {\n type: `AnalyticsController:getEventFragmentById`;\n handler: AnalyticsController['getEventFragmentById'];\n};\n\n/**\n * Discard an event fragment without emitting anything.\n *\n * @param id - The fragment ID.\n */\nexport type AnalyticsControllerDeleteEventFragmentAction = {\n type: `AnalyticsController:deleteEventFragment`;\n handler: AnalyticsController['deleteEventFragment'];\n};\n\n/**\n * Close an event fragment, emitting its closing event and discarding it.\n *\n * The event emitted is `failureEvent` when the journey was abandoned and\n * `successEvent` otherwise. A fragment that does not declare the relevant\n * event name is discarded silently, which is what makes a pure property bag\n * possible.\n *\n * @param id - The fragment ID.\n * @param options - Finalization options.\n * @param options.abandoned - Whether the journey was abandoned.\n * @param options.context - Context merged over the fragment's own context.\n * @throws Error if no fragment has that ID when the call is not ignored.\n * When the event fragments feature is disabled or the consent state does not\n * allow capture, the call is a logged no-op and does not throw.\n */\nexport type AnalyticsControllerFinalizeEventFragmentAction = {\n type: `AnalyticsController:finalizeEventFragment`;\n handler: AnalyticsController['finalizeEventFragment'];\n};\n\n/**\n * Opt in to analytics.\n *\n * Records that a consent decision has been made and replays any events that\n * were queued while the user was undecided.\n *\n * When geolocation enrichment is enabled, geolocation is resolved here (once\n * the user has consented) and awaited before the queued events are replayed,\n * so those events are enriched with the resolved location as they are sent.\n *\n * @returns A promise that resolves once opt-in processing has completed.\n */\nexport type AnalyticsControllerOptInAction = {\n type: `AnalyticsController:optIn`;\n handler: AnalyticsController['optIn'];\n};\n\n/**\n * Opt out of analytics.\n *\n * Records that a consent decision has been made and discards any persisted\n * events and in-progress event fragments so nothing captured before the\n * decision is ever delivered.\n */\nexport type AnalyticsControllerOptOutAction = {\n type: `AnalyticsController:optOut`;\n handler: AnalyticsController['optOut'];\n};\n\n/**\n * Reset the consent decision back to undecided.\n *\n * Intended for client flows that restart onboarding. Clears the opt-in\n * preference and discards the delivery queue, but preserves any pre-consent\n * events so they can still be replayed if the user opts in again. The user is\n * treated as undecided again.\n *\n * In-progress event fragments are kept only while the undecided user can\n * still accumulate them, and discarded otherwise, so no fragment outlives the\n * consent state that allowed it.\n */\nexport type AnalyticsControllerResetConsentDecisionAction = {\n type: `AnalyticsController:resetConsentDecision`;\n handler: AnalyticsController['resetConsentDecision'];\n};\n\n/**\n * Opt in to marketing analytics.\n *\n * Independent of {@link optIn}. Replays queued marketing events.\n *\n * @returns A promise that resolves once opt-in processing has completed.\n */\nexport type AnalyticsControllerOptInToMarketingAction = {\n type: `AnalyticsController:optInToMarketing`;\n handler: AnalyticsController['optInToMarketing'];\n};\n\n/**\n * Opt out of marketing analytics.\n *\n * Independent of {@link optOut}. Discards queued marketing events and\n * marketing event fragments.\n */\nexport type AnalyticsControllerOptOutOfMarketingAction = {\n type: `AnalyticsController:optOutOfMarketing`;\n handler: AnalyticsController['optOutOfMarketing'];\n};\n\n/**\n * Reset the marketing consent decision back to undecided.\n *\n * Independent of {@link resetConsentDecision}.\n */\nexport type AnalyticsControllerResetMarketingConsentDecisionAction = {\n type: `AnalyticsController:resetMarketingConsentDecision`;\n handler: AnalyticsController['resetMarketingConsentDecision'];\n};\n\n/**\n * Union of all AnalyticsController action types.\n */\nexport type AnalyticsControllerMethodActions =\n | AnalyticsControllerTrackEventAction\n | AnalyticsControllerIdentifyAction\n | AnalyticsControllerTrackViewAction\n | AnalyticsControllerCreateEventFragmentAction\n | AnalyticsControllerUpsertEventFragmentAction\n | AnalyticsControllerUpdateEventFragmentAction\n | AnalyticsControllerGetEventFragmentByIdAction\n | AnalyticsControllerDeleteEventFragmentAction\n | AnalyticsControllerFinalizeEventFragmentAction\n | AnalyticsControllerOptInAction\n | AnalyticsControllerOptOutAction\n | AnalyticsControllerResetConsentDecisionAction\n | AnalyticsControllerOptInToMarketingAction\n | AnalyticsControllerOptOutOfMarketingAction\n | AnalyticsControllerResetMarketingConsentDecisionAction;\n"]}
@@ -22,6 +22,26 @@ export declare const controllerName = "AnalyticsController";
22
22
  * `properties` or `sensitiveProperties` in storage indefinitely.
23
23
  */
24
24
  export declare const EVENT_FRAGMENT_MAX_AGE: number;
25
+ /**
26
+ * Purposes for which an analytics payload can be used.
27
+ */
28
+ export declare const AnalyticsPurpose: {
29
+ readonly Product: 'product';
30
+ readonly Marketing: 'marketing';
31
+ };
32
+ /**
33
+ * A purpose for which an analytics payload can be used.
34
+ */
35
+ export type AnalyticsPurpose = (typeof AnalyticsPurpose)[keyof typeof AnalyticsPurpose];
36
+ /**
37
+ * Persisted event-purpose classification fetched from config registry.
38
+ */
39
+ export type AnalyticsEventsConfig = {
40
+ schemaVersion: string;
41
+ version: string;
42
+ timestamp: number;
43
+ events: Record<string, AnalyticsPurpose[]>;
44
+ };
25
45
  /**
26
46
  * Describes the shape of the state object for {@link AnalyticsController}.
27
47
  */
@@ -30,6 +50,29 @@ export type AnalyticsControllerState = {
30
50
  * Whether the user has opted in to analytics.
31
51
  */
32
52
  optedIn: boolean;
53
+ /**
54
+ * Whether the user has opted in to marketing analytics.
55
+ *
56
+ * Independent of {@link optedIn}. Named events in the remote marketing list
57
+ * are governed only by this flag. Optional for backward compatibility with
58
+ * persisted state that predates this field. Missing values are treated as
59
+ * `false`.
60
+ */
61
+ optedInToMarketing?: boolean;
62
+ /**
63
+ * Whether the user has made a marketing consent decision (opted in or opted
64
+ * out). Mirrors {@link consentDecisionMade} for the marketing purpose.
65
+ * Optional for backward compatibility. Missing values are treated as `false`.
66
+ */
67
+ marketingConsentDecisionMade?: boolean;
68
+ /**
69
+ * Cached event-purpose configuration. Optional for backward compatibility.
70
+ *
71
+ * Phase 1 does not load this from a remote source. Until a later phase wires
72
+ * that up, classification uses the persisted config. Unlisted names are
73
+ * product-only.
74
+ */
75
+ eventsConfig?: AnalyticsEventsConfig;
33
76
  /**
34
77
  * User's UUIDv4 analytics identifier.
35
78
  * This is an identity (unique per user), not a preference.
@@ -91,6 +134,14 @@ export type AnalyticsQueuedEventBase = {
91
134
  * Original payload timestamp serialized for persistence.
92
135
  */
93
136
  timestamp: string;
137
+ /**
138
+ * Event purposes captured with the payload, before user consent is applied.
139
+ */
140
+ eventPurposes?: AnalyticsPurpose[];
141
+ /**
142
+ * Events config version used to classify the payload.
143
+ */
144
+ eventsConfigVersion?: string;
94
145
  };
95
146
  /**
96
147
  * Persisted track event queue entry.
@@ -273,10 +324,11 @@ export declare class AnalyticsController extends BaseController<'AnalyticsContro
273
324
  * method must be called after construction to complete the setup process.
274
325
  *
275
326
  * When geolocation enrichment is enabled (`isGeolocationEnabled`), geolocation
276
- * is resolved only for a user who is already opted in; for undecided or
277
- * opted-out users it is deferred until they opt in (see {@link optIn}), so a
278
- * user's location is never requested before they consent to analytics. In
279
- * either case the `GeolocationController` and its
327
+ * is resolved only for a user who is already opted in to product or marketing
328
+ * analytics. For users undecided or opted out of both purposes, it is
329
+ * deferred until they opt in to either one (see {@link optIn} and
330
+ * {@link optInToMarketing}), so a user's location is never requested before
331
+ * they consent to analytics. In either case the `GeolocationController` and its
280
332
  * `GeolocationController:getGeolocationData` action must be registered before
281
333
  * resolution occurs, or enrichment is skipped for the session (a message is
282
334
  * logged, see {@link #resolveLocationContext}).
@@ -426,6 +478,27 @@ export declare class AnalyticsController extends BaseController<'AnalyticsContro
426
478
  * consent state that allowed it.
427
479
  */
428
480
  resetConsentDecision(): void;
481
+ /**
482
+ * Opt in to marketing analytics.
483
+ *
484
+ * Independent of {@link optIn}. Replays queued marketing events.
485
+ *
486
+ * @returns A promise that resolves once opt-in processing has completed.
487
+ */
488
+ optInToMarketing(): Promise<void>;
489
+ /**
490
+ * Opt out of marketing analytics.
491
+ *
492
+ * Independent of {@link optOut}. Discards queued marketing events and
493
+ * marketing event fragments.
494
+ */
495
+ optOutOfMarketing(): void;
496
+ /**
497
+ * Reset the marketing consent decision back to undecided.
498
+ *
499
+ * Independent of {@link resetConsentDecision}.
500
+ */
501
+ resetMarketingConsentDecision(): void;
429
502
  }
430
503
  export {};
431
504
  //# sourceMappingURL=AnalyticsController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsController.d.ts","sourceRoot":"","sources":["../src/AnalyticsController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EACV,6CAA6C,EAE9C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAGrG,OAAO,KAAK,EACV,wBAAwB,EAExB,gBAAgB,EAChB,wBAAwB,EAExB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAEV,qCAAqC,EACrC,6BAA6B,EAC7B,6BAA6B,EAC7B,uBAAuB,EACvB,8BAA8B,EAC/B,MAAM,0BAA0B,CAAC;AAKlC;;;;GAIG;AACH,eAAO,MAAM,cAAc,wBAAwB,CAA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