flowgrid-sdk 1.7.10 → 1.8.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/dist/flowgrid.min.js +1 -1
- package/dist/flowgrid.min.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/consent/index.d.ts +1 -0
- package/dist/lib/consent/index.js +3 -1
- package/dist/lib/consent/index.js.map +1 -1
- package/dist/lib/consent/manager.js +8 -0
- package/dist/lib/consent/manager.js.map +1 -1
- package/dist/lib/consent/registry.d.ts +37 -0
- package/dist/lib/consent/registry.js +61 -0
- package/dist/lib/consent/registry.js.map +1 -0
- package/dist/lib/consent/types.d.ts +8 -0
- package/dist/lib/flowgrid.d.ts +22 -5
- package/dist/lib/flowgrid.js +44 -4
- package/dist/lib/flowgrid.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export { getCookie, getVisitorId, getSessionId, getWebId, getUTM, getUTMHistory,
|
|
|
46
46
|
export type { FlowGridUTM, FlowGridUTMHistoryEntry, } from "./lib/utils/storage";
|
|
47
47
|
export { IdentityManager } from "./lib/utils/identity";
|
|
48
48
|
export type { IdentityConfig, ServerCookieReader, } from "./lib/utils/identity";
|
|
49
|
-
export { ConsentManager, wireDeclarativeBanners } from "./lib/consent";
|
|
49
|
+
export { ConsentManager, wireDeclarativeBanners, grantConsentOnAuth } from "./lib/consent";
|
|
50
50
|
export type { ConsentConfig, ConsentPreferences, ConsentCategory as ConsentCategoryType, ConsentChangeEvent, CookieBannerConfig, CookieBannerTheme, WireDeclarativeBannersOptions, DeclarativeBannersHandle, } from "./lib/consent";
|
|
51
51
|
export { getOrCreateAnonId, getOrCreateCartId, resetCartId, setupConsent, attachConsentBanner, renderConsentBanner, } from "./lib/helpers";
|
|
52
52
|
export type { ConsentBannerOptions, ConsentBannerHandle, RenderConsentBannerOptions, } from "./lib/helpers";
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
31
31
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.
|
|
35
|
-
exports.renderConsentBanner = exports.attachConsentBanner = exports.setupConsent = exports.resetCartId = void 0;
|
|
34
|
+
exports.getOrCreateAnonId = exports.grantConsentOnAuth = exports.wireDeclarativeBanners = exports.ConsentManager = exports.IdentityManager = exports.getUTMHistory = exports.getUTM = exports.getWebId = exports.getSessionId = exports.getVisitorId = exports.getCookie = exports.Forecasting = exports.SecurityAnalytics = exports.AlertsAnalytics = exports.PathAnalytics = exports.AcquisitionAnalytics = exports.SupportAnalytics = exports.MultiPathFunnels = exports.Monetization = exports.ChurnAnalytics = exports.Cohorts = exports.Engagement = exports.FlowGridTransport = exports.Subscriptions = exports.SearchAnalytics = exports.CustomerLTV = exports.WishlistTracking = exports.Promotions = exports.Refunds = exports.Purchases = exports.Checkout = exports.CartTracking = exports.Products = exports.SessionReplay = exports.Performance = exports.PerformanceTracking = exports.Heatmaps = exports.Attribution = exports.Retention = exports.Funnels = exports.Identify = exports.Events = exports.Sessions = exports.PageViews = exports.Experiment = exports.TrackPrompt = exports.TrackFeature = exports.Activation = exports.default = exports.FlowGrid = void 0;
|
|
35
|
+
exports.renderConsentBanner = exports.attachConsentBanner = exports.setupConsent = exports.resetCartId = exports.getOrCreateCartId = void 0;
|
|
36
36
|
// ============================================================================
|
|
37
37
|
// UNIFIED SDK CLASS
|
|
38
38
|
// ============================================================================
|
|
@@ -117,6 +117,7 @@ Object.defineProperty(exports, "IdentityManager", { enumerable: true, get: funct
|
|
|
117
117
|
var consent_1 = require("./lib/consent");
|
|
118
118
|
Object.defineProperty(exports, "ConsentManager", { enumerable: true, get: function () { return consent_1.ConsentManager; } });
|
|
119
119
|
Object.defineProperty(exports, "wireDeclarativeBanners", { enumerable: true, get: function () { return consent_1.wireDeclarativeBanners; } });
|
|
120
|
+
Object.defineProperty(exports, "grantConsentOnAuth", { enumerable: true, get: function () { return consent_1.grantConsentOnAuth; } });
|
|
120
121
|
// ============================================================================
|
|
121
122
|
// DROP-IN HELPERS
|
|
122
123
|
//
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;;;;;AAEH,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,2CAA0C;AAAjC,oGAAA,QAAQ,OAAA;AACjB,2CAAyC;AAAhC,oHAAA,OAAO,OAAA;AAGhB,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,4CAK6B;AAJ3B,kGAAA,UAAU,OAAA;AACV,oGAAA,YAAY,OAAA;AACZ,mGAAA,WAAW,OAAA;AACX,kGAAA,UAAU,OAAA;AA8BZ,+EAA+E;AAC/E,4BAA4B;AAC5B,+EAA+E;AAE/E,sDAYkC;AAXhC,sGAAA,SAAS,OAAA;AACT,qGAAA,QAAQ,OAAA;AACR,mGAAA,MAAM,OAAA;AACN,qGAAA,QAAQ,OAAA;AACR,oGAAA,OAAO,OAAA;AACP,sGAAA,SAAS,OAAA;AACT,wGAAA,WAAW,OAAA;AACX,qGAAA,QAAQ,OAAA;AACR,gHAAA,mBAAmB,OAAA;AACnB,wGAAA,mBAAmB,OAAe;AAClC,0GAAA,aAAa,OAAA;AAiEf,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,sDAWkC;AAVhC,qGAAA,QAAQ,OAAA;AACR,yGAAA,YAAY,OAAA;AACZ,qGAAA,QAAQ,OAAA;AACR,sGAAA,SAAS,OAAA;AACT,oGAAA,OAAO,OAAA;AACP,uGAAA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AA,YAAY,OAAA;AACZ,uGAAA,YAAY,OAAA;AACZ,mGAAA,QAAQ,OAAA;AACR,iGAAA,MAAM,OAAA;AACN,wGAAA,aAAa,OAAA;AAQf,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,iDAAuD;AAA9C,2GAAA,eAAe,OAAA;AAOxB,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,yCAA2F;AAAlF,yGAAA,cAAc,OAAA;AAAE,iHAAA,sBAAsB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAanE,+EAA+E;AAC/E,kBAAkB;AAClB,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAE/E,yCAOuB;AANrB,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,sGAAA,WAAW,OAAA;AACX,uGAAA,YAAY,OAAA;AACZ,8GAAA,mBAAmB,OAAA;AACnB,8GAAA,mBAAmB,OAAA"}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* @see {@link ConsentManager} for the core API.
|
|
30
30
|
*/
|
|
31
31
|
export { ConsentManager } from './manager';
|
|
32
|
+
export { grantConsentOnAuth } from './registry';
|
|
32
33
|
export { wireDeclarativeBanners } from './declarativeBanner';
|
|
33
34
|
export type { WireDeclarativeBannersOptions, DeclarativeBannersHandle, } from './declarativeBanner';
|
|
34
35
|
export type { ConsentCategory, ConsentPreferences, ConsentConfig, ConsentChangeEvent, CookieBannerConfig, CookieBannerTheme, } from './types';
|
|
@@ -30,9 +30,11 @@
|
|
|
30
30
|
* @see {@link ConsentManager} for the core API.
|
|
31
31
|
*/
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.wireDeclarativeBanners = exports.ConsentManager = void 0;
|
|
33
|
+
exports.wireDeclarativeBanners = exports.grantConsentOnAuth = exports.ConsentManager = void 0;
|
|
34
34
|
var manager_1 = require("./manager");
|
|
35
35
|
Object.defineProperty(exports, "ConsentManager", { enumerable: true, get: function () { return manager_1.ConsentManager; } });
|
|
36
|
+
var registry_1 = require("./registry");
|
|
37
|
+
Object.defineProperty(exports, "grantConsentOnAuth", { enumerable: true, get: function () { return registry_1.grantConsentOnAuth; } });
|
|
36
38
|
var declarativeBanner_1 = require("./declarativeBanner");
|
|
37
39
|
Object.defineProperty(exports, "wireDeclarativeBanners", { enumerable: true, get: function () { return declarativeBanner_1.wireDeclarativeBanners; } });
|
|
38
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/consent/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;AAEH,qCAA2C;AAAlC,yGAAA,cAAc,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/consent/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;AAEH,qCAA2C;AAAlC,yGAAA,cAAc,OAAA;AACvB,uCAAgD;AAAvC,8GAAA,kBAAkB,OAAA;AAE3B,yDAA6D;AAApD,2HAAA,sBAAsB,OAAA"}
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
*/
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
exports.ConsentManager = void 0;
|
|
51
|
+
const registry_1 = require("./registry");
|
|
51
52
|
// ============================================================================
|
|
52
53
|
// DEFAULTS
|
|
53
54
|
// ============================================================================
|
|
@@ -124,6 +125,8 @@ class ConsentManager {
|
|
|
124
125
|
// responsibility — the SDK does not block essential or analytics data,
|
|
125
126
|
// including session replay, out of the box.
|
|
126
127
|
requireExplicitConsent: config?.requireExplicitConsent ?? false,
|
|
128
|
+
// Logging in = accepting tracking (see registry.ts). Opt out per manager.
|
|
129
|
+
grantOnAuth: config?.grantOnAuth ?? true,
|
|
127
130
|
onChange: config?.onChange,
|
|
128
131
|
defaultPreferences: {
|
|
129
132
|
...DEFAULT_PREFERENCES,
|
|
@@ -157,6 +160,11 @@ class ConsentManager {
|
|
|
157
160
|
preferences: true,
|
|
158
161
|
};
|
|
159
162
|
}
|
|
163
|
+
// Logging in = accepting tracking: the auth helpers auto-acceptAll() on
|
|
164
|
+
// every registered manager. Opt out per manager with `grantOnAuth: false`.
|
|
165
|
+
if (config?.grantOnAuth !== false) {
|
|
166
|
+
(0, registry_1.registerConsentManager)(this);
|
|
167
|
+
}
|
|
160
168
|
}
|
|
161
169
|
// ---------------------------------------------------------------------------
|
|
162
170
|
// PUBLIC API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/lib/consent/manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;;;
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/lib/consent/manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;;;AAMH,yCAAoD;AAEpD,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAE/E,MAAM,mBAAmB,GAAG,YAAY,CAAC;AACzC,MAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAC3D,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,MAAM,mBAAmB,GAAuB;IAC9C,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,IAAI;CAClB,CAAC;AAEF,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,cAAc;IAQzB;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG;YACZ,U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AAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtF,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,uBAAuB,MAAM,EAAE,CAAC;QAC3E,QAAQ,CAAC,MAAM,GAAG,GAAG,4BAA4B,uBAAuB,MAAM,EAAE,CAAC;IACnF,CAAC;CACF;AA7QD,wCA6QC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Consent-manager registry + login auto-grant.
|
|
3
|
+
* @module consent/registry
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* Logging in counts as accepting tracking: an authenticated user has agreed to
|
|
7
|
+
* the app's terms, so the auth helpers (`completeAuth`, `trackAuth`,
|
|
8
|
+
* `pingActiveUser`) auto-accept consent instead of leaving a banner up — the
|
|
9
|
+
* same behaviour a hand-rolled auth beacon would implement.
|
|
10
|
+
*
|
|
11
|
+
* Every {@link ConsentManager} registers itself here on construction (unless
|
|
12
|
+
* created with `grantOnAuth: false`), so the grant reaches whichever manager(s)
|
|
13
|
+
* the app wired — `setupConsent`, `attachConsentBanner`, `renderConsentBanner`
|
|
14
|
+
* or a bare `new ConsentManager()` — without the SDK knowing cookie names.
|
|
15
|
+
*/
|
|
16
|
+
import type { ConsentManager } from './manager';
|
|
17
|
+
/** Register a manager for the login auto-grant. Called from the constructor. */
|
|
18
|
+
export declare function registerConsentManager(manager: ConsentManager): void;
|
|
19
|
+
/**
|
|
20
|
+
* Accept all consent categories because the visitor authenticated.
|
|
21
|
+
*
|
|
22
|
+
* Fired automatically by the auth helpers ({@link FlowGrid.completeAuth},
|
|
23
|
+
* {@link FlowGrid.trackAuth}, {@link FlowGrid.pingActiveUser}); call it
|
|
24
|
+
* yourself only from a fully custom auth flow that bypasses them.
|
|
25
|
+
*
|
|
26
|
+
* Semantics mirror clicking "Accept all" on every registered manager: the
|
|
27
|
+
* choice is persisted in each manager's cookie (so banners gated on
|
|
28
|
+
* `hasConsented()` stay hidden on future visits), each manager's `onChange`
|
|
29
|
+
* fires (starting consent-gated streams like session replay), and it
|
|
30
|
+
* supersedes an earlier anonymous decline — logging in wins. Managers created
|
|
31
|
+
* with `grantOnAuth: false` are left untouched. Already fully-granted managers
|
|
32
|
+
* are skipped so repeated auth pings don't rewrite cookies.
|
|
33
|
+
*
|
|
34
|
+
* With no manager registered, it just opens the transport-level gates, which
|
|
35
|
+
* covers apps that called `FlowGridTransport.setConsent` by hand.
|
|
36
|
+
*/
|
|
37
|
+
export declare function grantConsentOnAuth(): void;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Consent-manager registry + login auto-grant.
|
|
4
|
+
* @module consent/registry
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Logging in counts as accepting tracking: an authenticated user has agreed to
|
|
8
|
+
* the app's terms, so the auth helpers (`completeAuth`, `trackAuth`,
|
|
9
|
+
* `pingActiveUser`) auto-accept consent instead of leaving a banner up — the
|
|
10
|
+
* same behaviour a hand-rolled auth beacon would implement.
|
|
11
|
+
*
|
|
12
|
+
* Every {@link ConsentManager} registers itself here on construction (unless
|
|
13
|
+
* created with `grantOnAuth: false`), so the grant reaches whichever manager(s)
|
|
14
|
+
* the app wired — `setupConsent`, `attachConsentBanner`, `renderConsentBanner`
|
|
15
|
+
* or a bare `new ConsentManager()` — without the SDK knowing cookie names.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.registerConsentManager = registerConsentManager;
|
|
19
|
+
exports.grantConsentOnAuth = grantConsentOnAuth;
|
|
20
|
+
const transport_1 = require("../client/transport");
|
|
21
|
+
const managers = new Set();
|
|
22
|
+
/** Register a manager for the login auto-grant. Called from the constructor. */
|
|
23
|
+
function registerConsentManager(manager) {
|
|
24
|
+
managers.add(manager);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Accept all consent categories because the visitor authenticated.
|
|
28
|
+
*
|
|
29
|
+
* Fired automatically by the auth helpers ({@link FlowGrid.completeAuth},
|
|
30
|
+
* {@link FlowGrid.trackAuth}, {@link FlowGrid.pingActiveUser}); call it
|
|
31
|
+
* yourself only from a fully custom auth flow that bypasses them.
|
|
32
|
+
*
|
|
33
|
+
* Semantics mirror clicking "Accept all" on every registered manager: the
|
|
34
|
+
* choice is persisted in each manager's cookie (so banners gated on
|
|
35
|
+
* `hasConsented()` stay hidden on future visits), each manager's `onChange`
|
|
36
|
+
* fires (starting consent-gated streams like session replay), and it
|
|
37
|
+
* supersedes an earlier anonymous decline — logging in wins. Managers created
|
|
38
|
+
* with `grantOnAuth: false` are left untouched. Already fully-granted managers
|
|
39
|
+
* are skipped so repeated auth pings don't rewrite cookies.
|
|
40
|
+
*
|
|
41
|
+
* With no manager registered, it just opens the transport-level gates, which
|
|
42
|
+
* covers apps that called `FlowGridTransport.setConsent` by hand.
|
|
43
|
+
*/
|
|
44
|
+
function grantConsentOnAuth() {
|
|
45
|
+
if (managers.size === 0) {
|
|
46
|
+
transport_1.FlowGridTransport.setConsent({ analytics: true, marketing: true });
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
for (const manager of managers) {
|
|
50
|
+
try {
|
|
51
|
+
const prefs = manager.getPreferences();
|
|
52
|
+
if (!manager.hasConsented() || !prefs.analytics || !prefs.marketing) {
|
|
53
|
+
manager.acceptAll();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
/* consent stamping is best-effort — never let it break auth tracking */
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/lib/consent/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAQH,wDAEC;AAoBD,gDAeC;AA1CD,mDAAwD;AAExD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE3C,gFAAgF;AAChF,SAAgB,sBAAsB,CAAC,OAAuB;IAC5D,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACxB,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACxB,6BAAiB,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACnE,OAAO;IACT,CAAC;IACD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;gBACpE,OAAO,CAAC,SAAS,EAAE,CAAC;YACtB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,wEAAwE;QAC1E,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -76,6 +76,14 @@ export interface ConsentConfig {
|
|
|
76
76
|
* GDPR-style opt-in flow.
|
|
77
77
|
*/
|
|
78
78
|
requireExplicitConsent?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Treat logging in as accepting tracking. Defaults to `true`: when the auth
|
|
81
|
+
* helpers (`completeAuth`, `trackAuth`, `pingActiveUser`) see an
|
|
82
|
+
* authenticated user, this manager auto-runs `acceptAll()` — persisting the
|
|
83
|
+
* choice, hiding consent banners, and superseding an earlier anonymous
|
|
84
|
+
* decline. Set `false` if authenticated users must still consent explicitly.
|
|
85
|
+
*/
|
|
86
|
+
grantOnAuth?: boolean;
|
|
79
87
|
}
|
|
80
88
|
/**
|
|
81
89
|
* Event emitted when consent changes.
|
package/dist/lib/flowgrid.d.ts
CHANGED
|
@@ -874,6 +874,11 @@ export declare class FlowGrid {
|
|
|
874
874
|
private readonly _wrapped;
|
|
875
875
|
/** Last identified user id — used by {@link logout} when none is passed. */
|
|
876
876
|
private _identifiedUserId;
|
|
877
|
+
/**
|
|
878
|
+
* In-memory fallback for the once-per-day {@link pingActiveUser} dedupe,
|
|
879
|
+
* used when localStorage is unavailable (privacy mode, non-browser runtime).
|
|
880
|
+
*/
|
|
881
|
+
private _lastActivePing;
|
|
877
882
|
/**
|
|
878
883
|
* One-line init. Idempotent — calling twice returns the same instance and
|
|
879
884
|
* logs a warning instead of starting auto-instrumentation again.
|
|
@@ -1011,6 +1016,11 @@ export declare class FlowGrid {
|
|
|
1011
1016
|
* user active for DAU/WAU/MAU. Framework-agnostic: call it from a React
|
|
1012
1017
|
* effect, a Vue watcher, a Svelte reactive block — wherever the id lands.
|
|
1013
1018
|
*
|
|
1019
|
+
* Also auto-accepts cookie consent: logging in counts as opting in to
|
|
1020
|
+
* tracking, so every {@link ConsentManager} (banner or headless) runs
|
|
1021
|
+
* `acceptAll()` and consent-gated streams start. Disable per manager with
|
|
1022
|
+
* `grantOnAuth: false`.
|
|
1023
|
+
*
|
|
1014
1024
|
* @example
|
|
1015
1025
|
* ```ts
|
|
1016
1026
|
* fg.completeAuth(user.id, { email: user.email, name: user.name });
|
|
@@ -1056,7 +1066,9 @@ export declare class FlowGrid {
|
|
|
1056
1066
|
* One-call auth tracking for apps that DON'T redirect (email/password, magic
|
|
1057
1067
|
* link resolved in-page): identify + fire the login/signup event + mark the
|
|
1058
1068
|
* user active, in a single call. Prefer {@link markLogin} + {@link completeAuth}
|
|
1059
|
-
* when your provider redirects.
|
|
1069
|
+
* when your provider redirects. Like {@link completeAuth}, it auto-accepts
|
|
1070
|
+
* cookie consent (logging in = opting in; disable per manager with
|
|
1071
|
+
* `grantOnAuth: false`).
|
|
1060
1072
|
*
|
|
1061
1073
|
* @example
|
|
1062
1074
|
* ```ts
|
|
@@ -1078,9 +1090,14 @@ export declare class FlowGrid {
|
|
|
1078
1090
|
/**
|
|
1079
1091
|
* Emit an "active user" signal for an identified user so the dashboard can
|
|
1080
1092
|
* compute DAU / WAU / MAU *by identity*. Fired automatically by the auth
|
|
1081
|
-
* helpers; call it yourself
|
|
1082
|
-
*
|
|
1083
|
-
*
|
|
1093
|
+
* helpers; call it yourself on app open to also count returning users who
|
|
1094
|
+
* don't re-authenticate. Carries email/name for parity with the
|
|
1095
|
+
* Known-visitor identity.
|
|
1096
|
+
*
|
|
1097
|
+
* **Self-throttling** — pings dedupe to once per user per UTC day (the
|
|
1098
|
+
* granularity DAU is counted at), so call this as often as you like: every
|
|
1099
|
+
* page load, every render, every route change. Repeat same-day calls are
|
|
1100
|
+
* dropped before they reach the network and never inflate event volume.
|
|
1084
1101
|
*
|
|
1085
1102
|
* @example
|
|
1086
1103
|
* ```ts
|
|
@@ -1091,7 +1108,7 @@ export declare class FlowGrid {
|
|
|
1091
1108
|
pingActiveUser(userId: string, traits?: {
|
|
1092
1109
|
email?: string;
|
|
1093
1110
|
name?: string;
|
|
1094
|
-
} & Record<string, unknown>): Promise<import("..").ActivationResponse
|
|
1111
|
+
} & Record<string, unknown>): Promise<import("..").ActivationResponse> | undefined;
|
|
1095
1112
|
/**
|
|
1096
1113
|
* Clear the identified user on logout so a shared device doesn't attribute the
|
|
1097
1114
|
* next visitor to the previous user. Resets the identity server-side and
|
package/dist/lib/flowgrid.js
CHANGED
|
@@ -71,6 +71,7 @@ const authIntent_1 = require("./features/analytics/authIntent");
|
|
|
71
71
|
const core_1 = require("./features/core");
|
|
72
72
|
const analytics_1 = require("./features/analytics");
|
|
73
73
|
const ecommerce_1 = require("./features/ecommerce");
|
|
74
|
+
const registry_1 = require("./consent/registry");
|
|
74
75
|
const core_2 = require("./tracking/core");
|
|
75
76
|
const analytics_2 = require("./tracking/analytics");
|
|
76
77
|
const ecommerce_2 = require("./tracking/ecommerce");
|
|
@@ -271,6 +272,11 @@ class FlowGrid {
|
|
|
271
272
|
this._wrapped = new Map();
|
|
272
273
|
/** Last identified user id — used by {@link logout} when none is passed. */
|
|
273
274
|
this._identifiedUserId = null;
|
|
275
|
+
/**
|
|
276
|
+
* In-memory fallback for the once-per-day {@link pingActiveUser} dedupe,
|
|
277
|
+
* used when localStorage is unavailable (privacy mode, non-browser runtime).
|
|
278
|
+
*/
|
|
279
|
+
this._lastActivePing = null;
|
|
274
280
|
this.webId = webId;
|
|
275
281
|
this.endpoint = endpoint;
|
|
276
282
|
this.apiKey = apiKey;
|
|
@@ -410,6 +416,11 @@ class FlowGrid {
|
|
|
410
416
|
* user active for DAU/WAU/MAU. Framework-agnostic: call it from a React
|
|
411
417
|
* effect, a Vue watcher, a Svelte reactive block — wherever the id lands.
|
|
412
418
|
*
|
|
419
|
+
* Also auto-accepts cookie consent: logging in counts as opting in to
|
|
420
|
+
* tracking, so every {@link ConsentManager} (banner or headless) runs
|
|
421
|
+
* `acceptAll()` and consent-gated streams start. Disable per manager with
|
|
422
|
+
* `grantOnAuth: false`.
|
|
423
|
+
*
|
|
413
424
|
* @example
|
|
414
425
|
* ```ts
|
|
415
426
|
* fg.completeAuth(user.id, { email: user.email, name: user.name });
|
|
@@ -468,7 +479,9 @@ class FlowGrid {
|
|
|
468
479
|
* One-call auth tracking for apps that DON'T redirect (email/password, magic
|
|
469
480
|
* link resolved in-page): identify + fire the login/signup event + mark the
|
|
470
481
|
* user active, in a single call. Prefer {@link markLogin} + {@link completeAuth}
|
|
471
|
-
* when your provider redirects.
|
|
482
|
+
* when your provider redirects. Like {@link completeAuth}, it auto-accepts
|
|
483
|
+
* cookie consent (logging in = opting in; disable per manager with
|
|
484
|
+
* `grantOnAuth: false`).
|
|
472
485
|
*
|
|
473
486
|
* @example
|
|
474
487
|
* ```ts
|
|
@@ -492,9 +505,14 @@ class FlowGrid {
|
|
|
492
505
|
/**
|
|
493
506
|
* Emit an "active user" signal for an identified user so the dashboard can
|
|
494
507
|
* compute DAU / WAU / MAU *by identity*. Fired automatically by the auth
|
|
495
|
-
* helpers; call it yourself
|
|
496
|
-
*
|
|
497
|
-
*
|
|
508
|
+
* helpers; call it yourself on app open to also count returning users who
|
|
509
|
+
* don't re-authenticate. Carries email/name for parity with the
|
|
510
|
+
* Known-visitor identity.
|
|
511
|
+
*
|
|
512
|
+
* **Self-throttling** — pings dedupe to once per user per UTC day (the
|
|
513
|
+
* granularity DAU is counted at), so call this as often as you like: every
|
|
514
|
+
* page load, every render, every route change. Repeat same-day calls are
|
|
515
|
+
* dropped before they reach the network and never inflate event volume.
|
|
498
516
|
*
|
|
499
517
|
* @example
|
|
500
518
|
* ```ts
|
|
@@ -503,6 +521,28 @@ class FlowGrid {
|
|
|
503
521
|
* ```
|
|
504
522
|
*/
|
|
505
523
|
pingActiveUser(userId, traits) {
|
|
524
|
+
// Logging in = accepting tracking: every auth helper (completeAuth,
|
|
525
|
+
// trackAuth) and the once-per-session app-boot ping funnels through here,
|
|
526
|
+
// so this is the one place that knows "this browser belongs to an
|
|
527
|
+
// authenticated user". Auto-accept consent on the app's managers/banners —
|
|
528
|
+
// opt out per manager with `grantOnAuth: false`.
|
|
529
|
+
(0, registry_1.grantConsentOnAuth)();
|
|
530
|
+
// Once per user per UTC day (the same `date` bucket the event carries):
|
|
531
|
+
// DAU/WAU/MAU count distinct users, so repeat same-day pings only burn
|
|
532
|
+
// event volume. Throttle here so no caller ever has to.
|
|
533
|
+
const stamp = `${userId}:${new Date().toISOString().slice(0, 10)}`;
|
|
534
|
+
try {
|
|
535
|
+
if (localStorage.getItem("fg_active_user_ping") === stamp)
|
|
536
|
+
return undefined;
|
|
537
|
+
localStorage.setItem("fg_active_user_ping", stamp);
|
|
538
|
+
}
|
|
539
|
+
catch {
|
|
540
|
+
// Storage unavailable (privacy mode, non-browser) — dedupe in memory,
|
|
541
|
+
// which still collapses same-page-load repeats.
|
|
542
|
+
if (this._lastActivePing === stamp)
|
|
543
|
+
return undefined;
|
|
544
|
+
this._lastActivePing = stamp;
|
|
545
|
+
}
|
|
506
546
|
// Rides the activation pipe (subtype `active_user`) so the wire event_name
|
|
507
547
|
// is `active_user` — the generic custom_event pipe stored it under
|
|
508
548
|
// event_name "custom_event", which the DAU/WAU/MAU pipes can't see.
|