@daybook/analytics 0.2.0 → 0.4.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 +66 -33
- package/LICENSE +21 -21
- package/README.md +536 -439
- package/dist/browser.js +99 -8
- package/dist/client.d.ts +32 -2
- package/dist/client.js +55 -12
- package/dist/context.d.ts +15 -0
- package/dist/context.js +85 -1
- package/dist/daybook.js +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +10 -1
- package/dist/module.d.ts +17 -0
- package/dist/module.js +70 -0
- package/dist/storage.d.ts +11 -0
- package/dist/storage.js +40 -0
- package/dist/types.d.ts +23 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +85 -80
package/CHANGELOG.md
CHANGED
|
@@ -1,33 +1,66 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
Every published version of `@daybook/analytics`. `npm run release` (`devops/publish-sdk.sh analytics`) refuses a version
|
|
4
|
-
that has no entry here: a release nobody wrote down is a release nobody hears of.
|
|
5
|
-
|
|
6
|
-
## 0.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Every published version of `@daybook/analytics`. `npm run release` (`devops/publish-sdk.sh analytics`) refuses a version
|
|
4
|
+
that has no entry here: a release nobody wrote down is a release nobody hears of.
|
|
5
|
+
|
|
6
|
+
## 0.4.0
|
|
7
|
+
|
|
8
|
+
Analytics is a module of Daybook's SDK family for the web (PM-R-0110).
|
|
9
|
+
|
|
10
|
+
- Start `@daybook/core` once with the site's one key and analytics is `daybook.analytics`:
|
|
11
|
+
`import '@daybook/analytics'` registers it, `await Daybook.initialize('dbk_…')` starts it.
|
|
12
|
+
`daybook.identify`, `daybook.reset` and `daybook.setTrackingConsent` reach it, and its own options go
|
|
13
|
+
under `analytics`.
|
|
14
|
+
- The site's key, `dbk_…`, is accepted wherever the ingest key was: `init({ key: 'dbk_…' })` and
|
|
15
|
+
`data-key="dbk_…"`. It is sent as the ingest key is, in the request's address, so a batch is still one
|
|
16
|
+
request and a beacon still works.
|
|
17
|
+
- The script tag is the family's: `data-key="dbk_…"` with `data-modules="analytics,feedback"` starts the
|
|
18
|
+
core and `window.daybook` is the started Daybook. A tag with `data-key="dak_…"` and no `data-modules`
|
|
19
|
+
behaves exactly as before.
|
|
20
|
+
- A site that moves from its hub key to the site's key keeps its visitors: the anonymous id, the session,
|
|
21
|
+
the registered properties, first touch and an opt-out are carried over.
|
|
22
|
+
- `init({ key })`, `DaybookProvider` and `createAnalytics` are unchanged. `@daybook/core` is now a
|
|
23
|
+
dependency; it has none of its own.
|
|
24
|
+
|
|
25
|
+
## 0.3.0
|
|
26
|
+
|
|
27
|
+
More of where and on what an event happened, as context columns a question can filter and break down by
|
|
28
|
+
(PM-T-0613).
|
|
29
|
+
|
|
30
|
+
- The person's settings: `timezone` (IANA), `languages` (every preferred one, in order), `calendar`,
|
|
31
|
+
`numbering_system`, `hour_cycle`.
|
|
32
|
+
- The screen: `screen_width`, `screen_height`, `pixel_ratio`; `color_scheme` (light or dark); `network`
|
|
33
|
+
(the connection as the browser rates it, where it says).
|
|
34
|
+
- Chromium's client hints, where the browser gives them: an Android phone's `device_model`, and the real
|
|
35
|
+
`os_version` where the user agent is frozen (Windows 11, macOS).
|
|
36
|
+
- Nothing that singles a device out rather than describing it: no canvas, fonts, graphics card, audio or
|
|
37
|
+
hardware counts.
|
|
38
|
+
|
|
39
|
+
## 0.2.0
|
|
40
|
+
|
|
41
|
+
Events at their true time, first touch on the person, and sessions as every Daybook SDK keeps them.
|
|
42
|
+
|
|
43
|
+
- Every batch carries `sent_at`, stamped as the request leaves — each retry and each beacon anew — so
|
|
44
|
+
Daybook places an event at the time it happened when the visitor's clock is wrong or the event waited
|
|
45
|
+
offline (PM-R-0068).
|
|
46
|
+
- `setPersonPropertiesOnce`: a person property written only where the person has none yet (PM-R-0067).
|
|
47
|
+
- Where the browser first came from (`$initial_referrer`, `$initial_referring_domain`, `$initial_utm_*`) is
|
|
48
|
+
set once on the person by itself, with the browser's first event, as `$set_once`.
|
|
49
|
+
- Sessions (PM-R-0069): a session also ends after 24 hours of steady use, and each opens with
|
|
50
|
+
`$session_start`, carrying the referrer and campaign it began from. Still shared by every tab, still new
|
|
51
|
+
after 30 minutes idle and on `reset()`.
|
|
52
|
+
|
|
53
|
+
## 0.1.0
|
|
54
|
+
|
|
55
|
+
First release (PM-R-0062).
|
|
56
|
+
|
|
57
|
+
- `init` / `new DaybookAnalytics({ key })`; `track`, `page`, `identify`, `reset`, `setPersonProperties`,
|
|
58
|
+
`register` / `unregister`, `optIn` / `optOut`, `flush`.
|
|
59
|
+
- Page views on load and on every navigation of a single-page app, with `$pageleave` and time on page;
|
|
60
|
+
sessions after 30 minutes idle; UTM and referrer, with the browser's first ones kept as `$initial_*`.
|
|
61
|
+
- Batched delivery as CORS-simple requests; retry with backoff; `sendBeacon` when the page is hidden; a
|
|
62
|
+
queue in `sessionStorage` that survives a reload.
|
|
63
|
+
- Consent: `optOutByDefault`, `respectDoNotTrack`, `beforeSend`; crawlers left out.
|
|
64
|
+
- `@daybook/analytics/react` (`DaybookProvider`, `useAnalytics`) and `@daybook/analytics/vue`
|
|
65
|
+
(`createAnalytics`, `useAnalytics`, Vue Router page views).
|
|
66
|
+
- The script-tag build, `dist/daybook.js`, served at `https://daybook.team/sdk/v1/daybook.js`.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Daybook
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Daybook
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|