@cross-deck/web 1.10.3 → 1.11.1

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
@@ -2,6 +2,34 @@
2
2
 
3
3
  All notable changes to `@cross-deck/web` will be documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## [1.11.1] — 2026-07-23
6
+
7
+ **Republish of 1.11.0 — release-pipeline fix only, identical SDK.** 1.11.0 never
8
+ reached npm: the react/vue bundle crossed its size budget by ~70 bytes (they bundle
9
+ the core, which grew with the cross-subdomain identity feature). Budget raised
10
+ 55 → 57 KB. No SDK change from 1.11.0 — see that entry.
11
+
12
+ ## [1.11.0] — 2026-07-23
13
+
14
+ **Added — cross-subdomain identity (marketing ↔ app is now ONE person).** Until now
15
+ the anonymous-ID cookie was host-only, so a visitor on your marketing site
16
+ (`example.com`) and your app (`app.example.com`) were two different anonymous
17
+ people — first-touch source, journey, and conversion never stitched across the
18
+ hop. Now the SDK scopes that cookie to the **registrable domain** by default, so a
19
+ visitor is one identity across every subdomain of your site. The whole funnel —
20
+ anonymous marketing visit → true source (referrer/UTM) → signup → revenue → errors
21
+ — lands on one timeline.
22
+
23
+ - New `cookieDomain` option: `"auto"` (default — the registrable domain, detected
24
+ the GA4 way: probe from the broadest candidate up, take the broadest the browser
25
+ accepts, so public suffixes like `.co.za`/`.com` are skipped with no bundled
26
+ list); an explicit domain (`".example.com"`); or `"none"` for the old host-only
27
+ behaviour. No config needed for the common case — it just works.
28
+ - **Non-breaking for existing identities:** localStorage still wins on read, so a
29
+ returning visitor keeps their id; it's simply also written to the shared domain
30
+ cookie now. Node/native are unaffected (cookies + subdomains are browser-only;
31
+ cross-*device* identity is resolved server-side by email/userId).
32
+
5
33
  ## [1.10.3] — 2026-07-22
6
34
 
7
35
  **Fixed — browser-injected globals no longer blamed on your code.** A browser (not
package/README.md CHANGED
@@ -93,7 +93,9 @@ That's the full happy path.
93
93
 
94
94
  Every event — auto-tracked and developer-emitted — is enriched with the device-info payload below.
95
95
 
96
- **Sessions survive page loads (v1.6.0+).** A session is a *visit*, not a page. The SDK persists the session (id, start time, last-activity time, first-touch acquisition) to the same storage as identity, so a full-page navigation on a multi-page site **resumes the same session** rather than starting a new one. The window is a rolling 30-minute inactivity timer bumped by every tracked event (auto or custom); only real 30-min inactivity or `Crossdeck.stop()` ends it. A page unload (`pagehide`/`beforeunload`) is treated as a navigation, not an end. Quick tab switches (Cmd-Tab) likewise don't end the session — matching GA4's session-window convention. Continuity is same-origin; cross-subdomain stitching is on the roadmap. With `persistIdentity: false` (or a `MemoryStorage` adapter) the session is in-memory only and resets per page.
96
+ **Sessions survive page loads (v1.6.0+).** A session is a *visit*, not a page. The SDK persists the session (id, start time, last-activity time, first-touch acquisition) to the same storage as identity, so a full-page navigation on a multi-page site **resumes the same session** rather than starting a new one. The window is a rolling 30-minute inactivity timer bumped by every tracked event (auto or custom); only real 30-min inactivity or `Crossdeck.stop()` ends it. A page unload (`pagehide`/`beforeunload`) is treated as a navigation, not an end. Quick tab switches (Cmd-Tab) likewise don't end the session — matching GA4's session-window convention. With `persistIdentity: false` (or a `MemoryStorage` adapter) the session is in-memory only and resets per page.
97
+
98
+ **Cross-subdomain identity (v1.11.0+).** A visitor is **one person across every subdomain** of your site — your marketing site (`example.com`) and your app (`app.example.com`) share one anonymous identity, so first-touch source, journey, and conversion stitch into one timeline instead of splitting at the hop. The SDK scopes its identity cookie to your **registrable domain** by default (`cookieDomain: "auto"`); set an explicit `cookieDomain: ".example.com"` to pin it, or `"none"` for host-only. Cross-*device* identity (same person, phone + laptop) is resolved server-side by `identify(userId)` — this is the browser half.
97
99
 
98
100
  **Per-session acquisition (v0.6.0+):** when a session starts the SDK reads `window.location.search` and `document.referrer` and captures `utm_source`, `utm_medium`, `utm_campaign`, `utm_content`, `utm_term`, plus `referrer`. Non-empty values are auto-attached to every subsequent event of that session — first-touch attribution stays pinned to the entry URL even after SPA route changes strip the params away, and now stays pinned across full-page navigations within the session too. A new session (>30 min idle) re-reads the URL.
99
101