@walkeros/web-destination-optimizely 4.1.0-next-1778668930820 → 4.1.0
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 +105 -0
- package/README.md +30 -94
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.js +7 -45
- package/dist/examples/index.mjs +7 -45
- package/dist/index.browser.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/walkerOS.json +9 -9
- package/package.json +6 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# @walkeros/web-destination-optimizely
|
|
2
|
+
|
|
3
|
+
## 4.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [e155ff8]
|
|
8
|
+
- Updated dependencies [e800974]
|
|
9
|
+
- Updated dependencies [e155ff8]
|
|
10
|
+
- Updated dependencies [1a8f2d7]
|
|
11
|
+
- Updated dependencies [1a8f2d7]
|
|
12
|
+
- Updated dependencies [b276173]
|
|
13
|
+
- Updated dependencies [dd9f5ad]
|
|
14
|
+
- Updated dependencies [c60ef35]
|
|
15
|
+
- Updated dependencies [adeebea]
|
|
16
|
+
- Updated dependencies [13aaeaa]
|
|
17
|
+
- Updated dependencies [e800974]
|
|
18
|
+
- Updated dependencies [adeebea]
|
|
19
|
+
- Updated dependencies [e800974]
|
|
20
|
+
- Updated dependencies [e800974]
|
|
21
|
+
- Updated dependencies [058f7ed]
|
|
22
|
+
- Updated dependencies [28a8ac2]
|
|
23
|
+
- Updated dependencies [fd6076e]
|
|
24
|
+
- @walkeros/core@4.1.0
|
|
25
|
+
- @walkeros/web-core@4.1.0
|
|
26
|
+
|
|
27
|
+
## 4.0.2
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- @walkeros/web-core@4.0.2
|
|
32
|
+
|
|
33
|
+
## 4.0.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- @walkeros/web-core@4.0.1
|
|
38
|
+
|
|
39
|
+
## 4.0.0
|
|
40
|
+
|
|
41
|
+
### Major Changes
|
|
42
|
+
|
|
43
|
+
- 93ea9c4: Event model v4: breaking changes to the `Event`, `Source`, and
|
|
44
|
+
`Entity` shapes.
|
|
45
|
+
- `event.id` is now a W3C span_id (16 lowercase hex chars), generated by the
|
|
46
|
+
collector. Reference: W3C Trace Context (W3C Recommendation, January 2020).
|
|
47
|
+
- `event.version`, `event.group`, `event.count` are removed.
|
|
48
|
+
- `source.type` is now the source kind (e.g. `browser`, `gtag`, `mcp`, `cli`).
|
|
49
|
+
New `source.platform` holds the runtime (`web` | `server` | `app` | ...).
|
|
50
|
+
- `source.id` and `source.previous_id` are removed.
|
|
51
|
+
- Browser source now sets `source.url` and `source.referrer`.
|
|
52
|
+
- MCP source sets `source.tool` per emission. CLI source sets
|
|
53
|
+
`source.command`.
|
|
54
|
+
- `Entity.nested` and `Entity.context` are now optional. Root `event.nested`
|
|
55
|
+
and `event.context` remain required.
|
|
56
|
+
- Each source self-registers via TypeScript module augmentation of `SourceMap`
|
|
57
|
+
in `@walkeros/core`.
|
|
58
|
+
- App-side coordination (`/workspaces/developer/app`) is a follow-up plan, not
|
|
59
|
+
part of this release. Telemetry from v4 CLI/MCP will not validate against
|
|
60
|
+
the existing app schema until that follow-up ships.
|
|
61
|
+
- `Mapping.Rule.skip` is renamed to `Mapping.Rule.silent`. Customer flow.json
|
|
62
|
+
configs using `skip: true` in mapping rules must rename to `silent: true`.
|
|
63
|
+
Hard cut: no legacy alias, the field is gone.
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Updated dependencies [93ea9c4]
|
|
68
|
+
- @walkeros/web-core@4.0.0
|
|
69
|
+
|
|
70
|
+
## 3.4.2
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- @walkeros/web-core@3.4.2
|
|
75
|
+
|
|
76
|
+
## 3.4.1
|
|
77
|
+
|
|
78
|
+
### Patch Changes
|
|
79
|
+
|
|
80
|
+
- Updated dependencies [caea905]
|
|
81
|
+
- @walkeros/web-core@3.4.1
|
|
82
|
+
|
|
83
|
+
## 3.4.0
|
|
84
|
+
|
|
85
|
+
### Minor Changes
|
|
86
|
+
|
|
87
|
+
- 74940cc: Add Optimizely Feature Experimentation web destination with
|
|
88
|
+
conversion tracking via trackEvent(), revenue/value event tags, user context
|
|
89
|
+
management with attribute targeting, and consent-based client lifecycle.
|
|
90
|
+
- 724f97e: Migrate every step example in every walkerOS package to the
|
|
91
|
+
standardized `[callable, ...args][]` shape introduced in `@walkeros/core`.
|
|
92
|
+
Every step example's `out` is now an array of effect tuples whose first
|
|
93
|
+
element is the callable's public SDK name (`'gtag'`, `'analytics.track'`,
|
|
94
|
+
`'fbq'`, `'dataLayer.push'`, `'sendServer'`, `'fetch'`, `'trackClient.track'`,
|
|
95
|
+
`'amplitude.track'`, `'fs.writeFile'`, `'producer.send'`, `'client.xadd'`,
|
|
96
|
+
`'client.send'`, `'dataset.table.insert'`, etc.). Source examples use `'elb'`
|
|
97
|
+
as the callable; transformer examples use the reserved `'return'` keyword;
|
|
98
|
+
store examples use store-operation callables (`'get'`, `'set'`). Tests capture
|
|
99
|
+
real calls on each component's spy and assert against `example.out` directly —
|
|
100
|
+
the hardcoded `PACKAGE_CALLS` registry in the app is no longer consulted
|
|
101
|
+
(emptied; plan #3 removes it structurally).
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- @walkeros/web-core@3.4.0
|
package/README.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
<p align="left">
|
|
2
|
+
<a href="https://www.walkeros.io">
|
|
3
|
+
<img alt="walkerOS" title="walkerOS" src="https://www.walkeros.io/img/walkerOS_logo.svg" width="256px"/>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
1
7
|
# @walkeros/web-destination-optimizely
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
Feature experimentation, A/B testing, and conversion tracking.
|
|
10
|
+
|
|
11
|
+
[Documentation](https://www.walkeros.io/docs/destinations/web/optimizely) •
|
|
12
|
+
[NPM Package](https://www.npmjs.com/package/@walkeros/web-destination-optimizely)
|
|
13
|
+
•
|
|
14
|
+
[Source Code](https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/optimizely)
|
|
8
15
|
|
|
9
16
|
## Installation
|
|
10
17
|
|
|
@@ -12,18 +19,20 @@ consent-based client lifecycle.
|
|
|
12
19
|
npm install @walkeros/web-destination-optimizely
|
|
13
20
|
```
|
|
14
21
|
|
|
15
|
-
## Quick
|
|
22
|
+
## Quick start
|
|
16
23
|
|
|
17
24
|
```json
|
|
18
25
|
{
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
"version": 4,
|
|
27
|
+
"flows": {
|
|
28
|
+
"default": {
|
|
22
29
|
"config": {
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
"platform": "web"
|
|
31
|
+
},
|
|
32
|
+
"destinations": {
|
|
33
|
+
"optimizely": {
|
|
34
|
+
"package": "@walkeros/web-destination-optimizely",
|
|
35
|
+
"config": {}
|
|
27
36
|
}
|
|
28
37
|
}
|
|
29
38
|
}
|
|
@@ -31,90 +40,17 @@ npm install @walkeros/web-destination-optimizely
|
|
|
31
40
|
}
|
|
32
41
|
```
|
|
33
42
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
|
-
import { startFlow } from '@walkeros/collector';
|
|
38
|
-
import destinationOptimizely from '@walkeros/web-destination-optimizely';
|
|
39
|
-
|
|
40
|
-
const { elb } = await startFlow();
|
|
41
|
-
|
|
42
|
-
elb('walker destination', destinationOptimizely, {
|
|
43
|
-
consent: { analytics: true },
|
|
44
|
-
settings: {
|
|
45
|
-
sdkKey: 'YOUR_SDK_KEY',
|
|
46
|
-
userId: 'user.id',
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Settings
|
|
52
|
-
|
|
53
|
-
| Key | Type | Default | Description |
|
|
54
|
-
| ---------------- | --------- | ------- | --------------------------------------------------------------------------------------------------------- |
|
|
55
|
-
| `sdkKey` | `string` | - | Required. Optimizely Feature Experimentation SDK key (Settings > Environments). |
|
|
56
|
-
| `userId` | `Mapping` | - | walkerOS mapping value resolving to the userId used for bucketing (e.g. `"user.id"`). Required per event. |
|
|
57
|
-
| `attributes` | `Mapping` | - | Destination-level user attributes for audience targeting. Applied via `createUserContext()`. |
|
|
58
|
-
| `updateInterval` | `number` | `60000` | Datafile polling interval (ms). |
|
|
59
|
-
| `autoUpdate` | `boolean` | `true` | Poll for datafile updates. |
|
|
60
|
-
| `batchSize` | `number` | `10` | Events per batch (batch event processor). |
|
|
61
|
-
| `flushInterval` | `number` | `1000` | Batch flush interval (ms). |
|
|
62
|
-
| `skipOdp` | `boolean` | `true` | Skip Optimizely Data Platform manager init. |
|
|
63
|
-
|
|
64
|
-
## Mapping
|
|
65
|
-
|
|
66
|
-
Per-rule overrides under `mapping.<entity>.<action>.settings`:
|
|
67
|
-
|
|
68
|
-
| Key | Type | Description |
|
|
69
|
-
| ------------ | --------- | --------------------------------------------------------------------------------------- |
|
|
70
|
-
| `eventKey` | `string` | Override event key sent to Optimizely. If omitted, the walkerOS event name is used. |
|
|
71
|
-
| `revenue` | `Mapping` | Resolves to integer cents. Passed as `eventTags.revenue`. |
|
|
72
|
-
| `value` | `Mapping` | Resolves to a float. Passed as `eventTags.value`. |
|
|
73
|
-
| `eventTags` | `Mapping` | Extra tags. Spread into the `eventTags` object. |
|
|
74
|
-
| `attributes` | `Mapping` | Per-event user attributes. Applied via `setAttribute()` before the `trackEvent()` call. |
|
|
75
|
-
|
|
76
|
-
Use `rule.name` to rename the event key and `rule.silent = true` to fire
|
|
77
|
-
attributes without a `trackEvent()` call.
|
|
78
|
-
|
|
79
|
-
## Revenue
|
|
80
|
-
|
|
81
|
-
Optimizely expects revenue as an **integer in cents** (e.g. `7281` = `$72.81`).
|
|
82
|
-
The destination passes the resolved value through without conversion - you must
|
|
83
|
-
provide cents.
|
|
43
|
+
## Documentation
|
|
84
44
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"order": {
|
|
88
|
-
"complete": {
|
|
89
|
-
"name": "purchase",
|
|
90
|
-
"settings": {
|
|
91
|
-
"revenue": "data.revenue_cents",
|
|
92
|
-
"value": "data.total"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Consent
|
|
100
|
-
|
|
101
|
-
Two layers:
|
|
102
|
-
|
|
103
|
-
1. **`config.consent`** - walkerOS gates delivery. Events are queued until
|
|
104
|
-
required consent keys resolve to `true`.
|
|
105
|
-
2. **`on('consent')`** - the destination closes the Optimizely client (flushing
|
|
106
|
-
queued events and stopping polling) when any required key flips to `false`.
|
|
107
|
-
On re-grant, the next push re-initializes the client.
|
|
108
|
-
|
|
109
|
-
```json
|
|
110
|
-
"config": { "consent": { "analytics": true } }
|
|
111
|
-
```
|
|
45
|
+
Full configuration, mapping, and examples live in the docs:
|
|
46
|
+
**https://www.walkeros.io/docs/destinations/web/optimizely**
|
|
112
47
|
|
|
113
|
-
##
|
|
48
|
+
## Contribute
|
|
114
49
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
50
|
+
Feel free to contribute by submitting an
|
|
51
|
+
[issue](https://github.com/elbwalker/walkerOS/issues), starting a
|
|
52
|
+
[discussion](https://github.com/elbwalker/walkerOS/discussions), or getting in
|
|
53
|
+
[contact](https://calendly.com/elb-alexander/30min).
|
|
118
54
|
|
|
119
55
|
## License
|
|
120
56
|
|