@ebitex/visitors-sdk 0.1.229 → 0.1.241
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/attribution.d.ts +19 -0
- package/dist/attribution.d.ts.map +1 -0
- package/dist/attribution.js +38 -0
- package/dist/attribution.js.map +1 -0
- package/dist/dropIn.d.ts +4 -0
- package/dist/dropIn.d.ts.map +1 -1
- package/dist/dropIn.js +8 -0
- package/dist/dropIn.js.map +1 -1
- package/dist/embeds.d.ts +51 -0
- package/dist/embeds.d.ts.map +1 -0
- package/dist/embeds.js +112 -0
- package/dist/embeds.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a visitor came from: the three campaign tags of the link they followed (the `utm_*` values under their short names). A neutral value that the suite's SDKs carry to the things that can
|
|
3
|
+
* create or identify a person, so Audience can record it once as their first touch.
|
|
4
|
+
*
|
|
5
|
+
* The text is untrusted (anyone can write a link). This SDK stores nothing: it reads the page's address, or what the site passes, at the moment it sends. Keeping a first touch across
|
|
6
|
+
* pages is the site's decision. The cleaning rules exist in four places (Audience, Forms, forms-sdk and here), held together by one shared fixture, so they are changed together or not at all.
|
|
7
|
+
*/
|
|
8
|
+
export interface Attribution {
|
|
9
|
+
source?: string;
|
|
10
|
+
medium?: string;
|
|
11
|
+
campaign?: string;
|
|
12
|
+
}
|
|
13
|
+
/** One member: control and format characters removed, trimmed, cut at 100 without leaving half a surrogate pair; `undefined` when nothing is left. */
|
|
14
|
+
export declare function cleanAttributionValue(value: unknown): string | undefined;
|
|
15
|
+
/** The attribution with every member cleaned, or `undefined` when it has nothing in it. */
|
|
16
|
+
export declare function normalizeAttribution(raw: unknown): Attribution | undefined;
|
|
17
|
+
/** The three `utm_*` tags of an address' query string (the first value of each), cleaned. */
|
|
18
|
+
export declare function readAttributionFromSearch(search: string): Attribution | undefined;
|
|
19
|
+
//# sourceMappingURL=attribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../src/attribution.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAID,sJAAsJ;AACtJ,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAWxE;AAED,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAW1E;AAED,6FAA6F;AAC7F,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAGjF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const MAX_LENGTH = 100;
|
|
2
|
+
/** One member: control and format characters removed, trimmed, cut at 100 without leaving half a surrogate pair; `undefined` when nothing is left. */
|
|
3
|
+
export function cleanAttributionValue(value) {
|
|
4
|
+
if (typeof value !== 'string')
|
|
5
|
+
return undefined;
|
|
6
|
+
let text = value.replace(/[\p{Cc}\p{Cf}]/gu, '').trim();
|
|
7
|
+
if (text.length > MAX_LENGTH) {
|
|
8
|
+
text = text.slice(0, MAX_LENGTH);
|
|
9
|
+
const last = text.charCodeAt(text.length - 1);
|
|
10
|
+
if (last >= 0xd800 && last <= 0xdbff)
|
|
11
|
+
text = text.slice(0, -1);
|
|
12
|
+
text = text.trimEnd();
|
|
13
|
+
}
|
|
14
|
+
return text === '' ? undefined : text;
|
|
15
|
+
}
|
|
16
|
+
/** The attribution with every member cleaned, or `undefined` when it has nothing in it. */
|
|
17
|
+
export function normalizeAttribution(raw) {
|
|
18
|
+
if (raw === null || typeof raw !== 'object')
|
|
19
|
+
return undefined;
|
|
20
|
+
const input = raw;
|
|
21
|
+
const result = {};
|
|
22
|
+
const source = cleanAttributionValue(input.source);
|
|
23
|
+
const medium = cleanAttributionValue(input.medium);
|
|
24
|
+
const campaign = cleanAttributionValue(input.campaign);
|
|
25
|
+
if (source !== undefined)
|
|
26
|
+
result.source = source;
|
|
27
|
+
if (medium !== undefined)
|
|
28
|
+
result.medium = medium;
|
|
29
|
+
if (campaign !== undefined)
|
|
30
|
+
result.campaign = campaign;
|
|
31
|
+
return Object.keys(result).length === 0 ? undefined : result;
|
|
32
|
+
}
|
|
33
|
+
/** The three `utm_*` tags of an address' query string (the first value of each), cleaned. */
|
|
34
|
+
export function readAttributionFromSearch(search) {
|
|
35
|
+
const params = new URLSearchParams(search);
|
|
36
|
+
return normalizeAttribution({ source: params.get('utm_source'), medium: params.get('utm_medium'), campaign: params.get('utm_campaign') });
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=attribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribution.js","sourceRoot":"","sources":["../src/attribution.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,GAAG,GAAG,CAAA;AAEtB,sJAAsJ;AACtJ,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAA;IAC/C,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;IACvD,IAAI,IAAI,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;QAC7B,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC7C,IAAI,IAAI,IAAI,MAAM,IAA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AC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAA;AAC3I,CAAC"}
|
package/dist/dropIn.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ import type { Visitors } from './types.js';
|
|
|
18
18
|
* `<meta name="ebitex:categories" content="id,id,...">` (a published page's `classification` from the Content Delivery API has them), and the script records one `content.viewed` event for
|
|
19
19
|
* them. A page without that tag records nothing. A single-page app calls `window.ebitexVisitors.pageViewed({ categories })` on each route change instead.
|
|
20
20
|
*
|
|
21
|
+
* `data-ebitex-embeds` lets an ebitex form embedded in an `<iframe>` on the page recognise the same visitor as the page, in
|
|
22
|
+
* browsers where a frame can hold no cookie (see `connectEmbeds`). It is off unless you ask. `data-ebitex-forms-origin` names the
|
|
23
|
+
* form host when it is not `https://forms.ebitex.io`.
|
|
24
|
+
*
|
|
21
25
|
* Attributes on a control: `data-ebitex-forget-confirm="off"` to skip the confirmation question, `data-ebitex-done-text`
|
|
22
26
|
* and `data-ebitex-error-text` for your own wording, and `data-ebitex-forget-status="#id"` to say where the result goes
|
|
23
27
|
* (by default a status line is added after the control). After a successful forget a `ebitex:visitor-forgotten` event
|
package/dist/dropIn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropIn.d.ts","sourceRoot":"","sources":["../src/dropIn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dropIn.d.ts","sourceRoot":"","sources":["../src/dropIn.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAK1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,QAAmB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,IAAI,CA2B3F"}
|
package/dist/dropIn.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { connectEmbeds } from './embeds.js';
|
|
1
2
|
import { createVisitors } from './visitors.js';
|
|
2
3
|
/** What the visitor sees if forgetting fails and the page gave no wording of its own. */
|
|
3
4
|
const DEFAULT_ERROR_TEXT = 'Something went wrong. Please try again.';
|
|
@@ -20,6 +21,10 @@ const DEFAULT_ERROR_TEXT = 'Something went wrong. Please try again.';
|
|
|
20
21
|
* `<meta name="ebitex:categories" content="id,id,...">` (a published page's `classification` from the Content Delivery API has them), and the script records one `content.viewed` event for
|
|
21
22
|
* them. A page without that tag records nothing. A single-page app calls `window.ebitexVisitors.pageViewed({ categories })` on each route change instead.
|
|
22
23
|
*
|
|
24
|
+
* `data-ebitex-embeds` lets an ebitex form embedded in an `<iframe>` on the page recognise the same visitor as the page, in
|
|
25
|
+
* browsers where a frame can hold no cookie (see `connectEmbeds`). It is off unless you ask. `data-ebitex-forms-origin` names the
|
|
26
|
+
* form host when it is not `https://forms.ebitex.io`.
|
|
27
|
+
*
|
|
23
28
|
* Attributes on a control: `data-ebitex-forget-confirm="off"` to skip the confirmation question, `data-ebitex-done-text`
|
|
24
29
|
* and `data-ebitex-error-text` for your own wording, and `data-ebitex-forget-status="#id"` to say where the result goes
|
|
25
30
|
* (by default a status line is added after the control). After a successful forget a `ebitex:visitor-forgotten` event
|
|
@@ -43,6 +48,9 @@ export function startDropIn(doc = document, signal) {
|
|
|
43
48
|
// Never throws into the page: a view that could not be recorded is not worth a console error on every load.
|
|
44
49
|
void visitors.pageViewed({ categories }).catch(() => undefined);
|
|
45
50
|
}
|
|
51
|
+
if (script.dataset.ebitexEmbeds !== undefined && script.dataset.ebitexEmbeds !== 'off') {
|
|
52
|
+
connectEmbeds(visitors, { formsOrigin: script.dataset.ebitexFormsOrigin || undefined, signal });
|
|
53
|
+
}
|
|
46
54
|
doc.addEventListener('click', (event) => {
|
|
47
55
|
const control = event.target?.closest('[data-ebitex-forget]');
|
|
48
56
|
if (!control)
|
package/dist/dropIn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropIn.js","sourceRoot":"","sources":["../src/dropIn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG9C,yFAAyF;AACzF,MAAM,kBAAkB,GAAG,yCAAyC,CAAA;AAEpE
|
|
1
|
+
{"version":3,"file":"dropIn.js","sourceRoot":"","sources":["../src/dropIn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG9C,yFAAyF;AACzF,MAAM,kBAAkB,GAAG,yCAAyC,CAAA;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,WAAW,CAAC,MAAgB,QAAQ,EAAE,MAAoB;IACxE,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,CAAc,yBAAyB,CAAC,CAAA;IACxE,MAAM,GAAG,GAAG,MAAM,EAAE,OAAO,CAAC,SAAS,CAAA;IACrC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAA;IAEhC,MAAM,QAAQ,GAAG,cAAc,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,IAAI,SAAS,EAAE,CAAC,CAC7F;IAAC,GAAG,CAAC,WAAgE,CAAC,cAAc,GAAG,QAAQ,CAAA;IAChG,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,KAAK,QAAQ;QAAE,KAAK,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IAC3F,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,KAAK,KAAK,EAAE,CAAC;QAC7F,MAAM,OAAO,G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O,CAAC,sBAAsB,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACtG,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;QAClC,MAAM,CAAC,OAAO,CAAC,sBAAsB,GAAG,MAAM,CAAA;QAC9C,OAAO,CAAC,qBAAqB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IACnD,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IACzD,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IAClE,MAAM,CAAC,WAAW,GAAG,IAAI,CAAA;AAC3B,CAAC"}
|
package/dist/embeds.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type Attribution } from './attribution.js';
|
|
2
|
+
import type { Visitors } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Lets an ebitex form embedded in an `<iframe>` on this page recognise the same visitor as the page, in browsers where a
|
|
5
|
+
* frame can hold no cookie of its own.
|
|
6
|
+
*
|
|
7
|
+
* The form frame announces itself; this answers with the page's token, sent only to the form host's exact origin (read from
|
|
8
|
+
* the iframe's own `src`), never to `*` and never in a URL. What the frame sends back is a token and a consent state, which
|
|
9
|
+
* go through {@link Visitors.adopt}, so they are kept on the device only under the same rules as any other answer. A visitor
|
|
10
|
+
* who uses "forget this browser" inside the frame is forgotten here too (the suite-wide forget, which also ends the link to
|
|
11
|
+
* a person).
|
|
12
|
+
*
|
|
13
|
+
* Nothing happens unless you call it, and a page with no ebitex iframes is unaffected. Only iframes of this page whose
|
|
14
|
+
* `src` is on one of the given origins are ever answered.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_FORMS_ORIGIN = "https://forms.ebitex.io";
|
|
17
|
+
export interface ConnectEmbedsOptions {
|
|
18
|
+
/** The origin(s) the form frames are served from. Defaults to {@link DEFAULT_FORMS_ORIGIN}. */
|
|
19
|
+
formsOrigin?: string | readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* Where the visitor came from, the tags of the link they followed, handed to the form frame with the token so a submission can be attributed to its campaign. A value, or a function asked each
|
|
22
|
+
* time a frame is answered. Defaults to the `utm_source`, `utm_medium` and `utm_campaign` of this page's own address; pass your own to give a first touch you kept from an earlier page. This
|
|
23
|
+
* SDK stores nothing. The frame cleans it again; the text is untrusted.
|
|
24
|
+
*/
|
|
25
|
+
attribution?: Attribution | (() => Attribution | undefined);
|
|
26
|
+
/** Stops answering frames. */
|
|
27
|
+
signal?: AbortSignal;
|
|
28
|
+
/** For tests. */
|
|
29
|
+
window?: EmbedsWindow;
|
|
30
|
+
}
|
|
31
|
+
/** The part of `window` this needs. */
|
|
32
|
+
export interface EmbedsWindow {
|
|
33
|
+
/** Only `search` is read, for the default attribution. */
|
|
34
|
+
location?: {
|
|
35
|
+
search: string;
|
|
36
|
+
};
|
|
37
|
+
document: {
|
|
38
|
+
getElementsByTagName(name: 'iframe'): ArrayLike<{
|
|
39
|
+
src: string;
|
|
40
|
+
contentWindow: EmbedFrameWindow | null;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
addEventListener(type: 'message', listener: (event: MessageEvent) => void): void;
|
|
44
|
+
removeEventListener(type: 'message', listener: (event: MessageEvent) => void): void;
|
|
45
|
+
}
|
|
46
|
+
export interface EmbedFrameWindow {
|
|
47
|
+
postMessage(message: unknown, targetOrigin: string): void;
|
|
48
|
+
}
|
|
49
|
+
/** Returns a function that stops. */
|
|
50
|
+
export declare function connectEmbeds(visitors: Visitors, options?: ConnectEmbedsOptions): () => void;
|
|
51
|
+
//# sourceMappingURL=embeds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAE,oBAAyB,GAAG,MAAM,IAAI,CA6EhG"}
|
package/dist/embeds.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { normalizeAttribution, readAttributionFromSearch } from './attribution.js';
|
|
2
|
+
/**
|
|
3
|
+
* Lets an ebitex form embedded in an `<iframe>` on this page recognise the same visitor as the page, in browsers where a
|
|
4
|
+
* frame can hold no cookie of its own.
|
|
5
|
+
*
|
|
6
|
+
* The form frame announces itself; this answers with the page's token, sent only to the form host's exact origin (read from
|
|
7
|
+
* the iframe's own `src`), never to `*` and never in a URL. What the frame sends back is a token and a consent state, which
|
|
8
|
+
* go through {@link Visitors.adopt}, so they are kept on the device only under the same rules as any other answer. A visitor
|
|
9
|
+
* who uses "forget this browser" inside the frame is forgotten here too (the suite-wide forget, which also ends the link to
|
|
10
|
+
* a person).
|
|
11
|
+
*
|
|
12
|
+
* Nothing happens unless you call it, and a page with no ebitex iframes is unaffected. Only iframes of this page whose
|
|
13
|
+
* `src` is on one of the given origins are ever answered.
|
|
14
|
+
*/
|
|
15
|
+
export const DEFAULT_FORMS_ORIGIN = 'https://forms.ebitex.io';
|
|
16
|
+
const SOURCE = 'ebitex-forms-embed';
|
|
17
|
+
const VERSION = 1;
|
|
18
|
+
function readMessage(data) {
|
|
19
|
+
if (data === null || typeof data !== 'object')
|
|
20
|
+
return null;
|
|
21
|
+
const message = data;
|
|
22
|
+
if (message.source !== SOURCE || message.v !== VERSION || typeof message.type !== 'string')
|
|
23
|
+
return null;
|
|
24
|
+
return message;
|
|
25
|
+
}
|
|
26
|
+
/** Returns a function that stops. */
|
|
27
|
+
export function connectEmbeds(visitors, options = {}) {
|
|
28
|
+
const win = options.window ?? (typeof window === 'undefined' ? undefined : window);
|
|
29
|
+
if (!win)
|
|
30
|
+
return () => undefined;
|
|
31
|
+
const origins = new Set((Array.isArray(options.formsOrigin) ? options.formsOrigin : [options.formsOrigin ?? DEFAULT_FORMS_ORIGIN]).map(normaliseOrigin));
|
|
32
|
+
// The frames this page has answered, and the token each was last given, so a change reaches them and a repeat does not ping-pong.
|
|
33
|
+
const answered = new Map();
|
|
34
|
+
function frameOf(source) {
|
|
35
|
+
if (source === null)
|
|
36
|
+
return null;
|
|
37
|
+
for (const frame of Array.from(win.document.getElementsByTagName('iframe'))) {
|
|
38
|
+
const frameWindow = frame.contentWindow;
|
|
39
|
+
if (frameWindow === null || frameWindow !== source)
|
|
40
|
+
continue;
|
|
41
|
+
const origin = originOf(frame.src);
|
|
42
|
+
return origin !== null && origins.has(origin) ? { window: frameWindow, origin } : null;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
function attributionNow() {
|
|
47
|
+
const given = typeof options.attribution === 'function' ? options.attribution() : options.attribution;
|
|
48
|
+
return normalizeAttribution(given) ?? (options.attribution === undefined ? readAttributionFromSearch(win.location?.search ?? '') : undefined);
|
|
49
|
+
}
|
|
50
|
+
function give(frame, origin, token) {
|
|
51
|
+
answered.set(frame, { origin, sent: token });
|
|
52
|
+
const attribution = attributionNow();
|
|
53
|
+
frame.postMessage({ source: SOURCE, v: VERSION, type: 'visitor', token, ...(attribution === undefined ? {} : { attribution }) }, origin);
|
|
54
|
+
}
|
|
55
|
+
const listener = (event) => {
|
|
56
|
+
const message = readMessage(event.data);
|
|
57
|
+
if (message === null)
|
|
58
|
+
return;
|
|
59
|
+
const frame = frameOf(event.source);
|
|
60
|
+
// Only a frame of this page, served from the form host, and speaking from that host's origin.
|
|
61
|
+
if (frame === null || event.origin !== frame.origin)
|
|
62
|
+
return;
|
|
63
|
+
if (message.type === 'ready') {
|
|
64
|
+
void visitors.ready.then(() => give(frame.window, frame.origin, visitors.token));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
// Anything else is a reply, and only to a frame this page has spoken to.
|
|
68
|
+
const known = answered.get(frame.window);
|
|
69
|
+
if (!known)
|
|
70
|
+
return;
|
|
71
|
+
if (message.type === 'visitor-result') {
|
|
72
|
+
if (typeof message.visitor !== 'string' || message.visitor === '' || message.consent === null || typeof message.consent !== 'object')
|
|
73
|
+
return;
|
|
74
|
+
// Set before adopting: adopting notifies, and the frame that just answered must not be sent the token it just sent.
|
|
75
|
+
known.sent = message.visitor;
|
|
76
|
+
void visitors.adopt({ visitor: message.visitor, consent: message.consent }).catch(() => undefined);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (message.type === 'forgotten') {
|
|
80
|
+
void visitors.forget().catch(() => undefined);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
win.addEventListener('message', listener);
|
|
84
|
+
// The page's token arrives or changes after a frame announced itself (the visitor's consent answered late, a sibling frame
|
|
85
|
+
// rotated the token): tell every frame that has not been given this one. A frame that has not announced is never sent anything.
|
|
86
|
+
const unsubscribe = visitors.subscribe(({ token }) => {
|
|
87
|
+
for (const [frame, state] of answered) {
|
|
88
|
+
if (state.sent !== token)
|
|
89
|
+
give(frame, state.origin, token);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
const stop = () => {
|
|
93
|
+
win.removeEventListener('message', listener);
|
|
94
|
+
unsubscribe();
|
|
95
|
+
answered.clear();
|
|
96
|
+
};
|
|
97
|
+
options.signal?.addEventListener('abort', stop, { once: true });
|
|
98
|
+
return stop;
|
|
99
|
+
}
|
|
100
|
+
function originOf(url) {
|
|
101
|
+
try {
|
|
102
|
+
const origin = new URL(url).origin;
|
|
103
|
+
return origin === 'null' ? null : origin;
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function normaliseOrigin(value) {
|
|
110
|
+
return originOf(value) ?? value;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=embeds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeds.js","sourceRoot":"","sources":["../src/embeds.ts"],"names":[],"mappings":"AAAA,OAAO,E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AAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAA;AACjC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { createVisitors } from './visitors.js';
|
|
2
2
|
export { cookieStorage } from './storage.js';
|
|
3
|
+
export { connectEmbeds, DEFAULT_FORMS_ORIGIN } from './embeds.js';
|
|
4
|
+
export type { ConnectEmbedsOptions } from './embeds.js';
|
|
5
|
+
export type { Attribution } from './attribution.js';
|
|
3
6
|
export type { CookieStorageOptions } from './storage.js';
|
|
4
7
|
export { VisitorsApiError, DEFAULT_ENDPOINT } from './client.js';
|
|
5
8
|
export type { ConsentMessages, ConsentOptions, ConsentSignals, ConsentState, EventInput, EventResult, InteractionOptions, InteractionResult, Visitors, VisitorSession, VisitorsOptions, VisitorsSnapshot, VisitorStorage, } from './types.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,YAAY,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAChE,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,YAAY,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAChE,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAIjE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebitex/visitors-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.241",
|
|
4
4
|
"description": "Recognise a returning visitor with their consent, honour Global Privacy Control and your own consent tool, and let them forget their device, from any site. No forms needed.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ebitex",
|