@guardian/ophan-tracker-js 4.0.2 → 5.0.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/NPM-dist/adblock-detection.js +17 -11
- package/NPM-dist/adblock-detection.js.map +1 -0
- package/NPM-dist/attention.js +32 -19
- package/NPM-dist/attention.js.map +1 -0
- package/NPM-dist/campaign.js +6 -2
- package/NPM-dist/campaign.js.map +1 -0
- package/NPM-dist/click-path-capture.js +5 -2
- package/NPM-dist/click-path-capture.js.map +1 -0
- package/NPM-dist/components.js +1 -0
- package/NPM-dist/components.js.map +1 -0
- package/NPM-dist/contribution.js +1 -0
- package/NPM-dist/contribution.js.map +1 -0
- package/NPM-dist/core.js +40 -10
- package/NPM-dist/core.js.map +1 -0
- package/NPM-dist/embed.js +1 -0
- package/NPM-dist/embed.js.map +1 -0
- package/NPM-dist/fb-instant.js +1 -0
- package/NPM-dist/fb-instant.js.map +1 -0
- package/NPM-dist/heatmap.js +4 -0
- package/NPM-dist/heatmap.js.map +1 -0
- package/NPM-dist/holidays.js +1 -0
- package/NPM-dist/holidays.js.map +1 -0
- package/NPM-dist/http-status.js +1 -0
- package/NPM-dist/http-status.js.map +1 -0
- package/NPM-dist/iframe-tracking.js +16 -3
- package/NPM-dist/iframe-tracking.js.map +1 -0
- package/NPM-dist/index.js +285 -0
- package/NPM-dist/index.js.map +1 -0
- package/NPM-dist/interactive.js +1 -0
- package/NPM-dist/interactive.js.map +1 -0
- package/NPM-dist/jobs-courses.js +1 -0
- package/NPM-dist/jobs-courses.js.map +1 -0
- package/NPM-dist/jobs.js +1 -0
- package/NPM-dist/jobs.js.map +1 -0
- package/NPM-dist/membership.js +1 -0
- package/NPM-dist/membership.js.map +1 -0
- package/NPM-dist/ng.js +10 -33
- package/NPM-dist/ng.js.map +1 -0
- package/NPM-dist/perf.js +3 -2
- package/NPM-dist/perf.js.map +1 -0
- package/NPM-dist/privatebrowsing.js +1 -0
- package/NPM-dist/privatebrowsing.js.map +1 -0
- package/NPM-dist/r2.js +8 -4
- package/NPM-dist/r2.js.map +1 -0
- package/NPM-dist/smart-news.js +10 -3
- package/NPM-dist/smart-news.js.map +1 -0
- package/NPM-dist/tests/attention.test.js +1 -0
- package/NPM-dist/tests/attention.test.js.map +1 -0
- package/NPM-dist/tests/click-path-capture.test.js +1 -0
- package/NPM-dist/tests/click-path-capture.test.js.map +1 -0
- package/NPM-dist/tests/components.test.js +1 -0
- package/NPM-dist/tests/components.test.js.map +1 -0
- package/NPM-dist/tests/core.test.js +1 -0
- package/NPM-dist/tests/core.test.js.map +1 -0
- package/NPM-dist/tests/heatmap.test.js +1 -0
- package/NPM-dist/tests/heatmap.test.js.map +1 -0
- package/NPM-dist/tests/index.test.js +18 -0
- package/NPM-dist/tests/index.test.js.map +1 -0
- package/NPM-dist/tests/transmit.test.js +1 -0
- package/NPM-dist/tests/transmit.test.js.map +1 -0
- package/NPM-dist/transmit.js +23 -5
- package/NPM-dist/transmit.js.map +1 -0
- package/NPM-dist/types/abtest.js +1 -0
- package/NPM-dist/types/abtest.js.map +1 -0
- package/NPM-dist/types/adblock-detection.d.ts +1 -0
- package/NPM-dist/types/adblock-detection.d.ts.map +1 -0
- package/NPM-dist/types/attention.d.ts +1 -0
- package/NPM-dist/types/attention.d.ts.map +1 -0
- package/NPM-dist/types/campaign.d.ts +1 -0
- package/NPM-dist/types/campaign.d.ts.map +1 -0
- package/NPM-dist/types/click-path-capture.d.ts +1 -0
- package/NPM-dist/types/click-path-capture.d.ts.map +1 -0
- package/NPM-dist/types/component-event.js +1 -0
- package/NPM-dist/types/component-event.js.map +1 -0
- package/NPM-dist/types/component-type.js +1 -0
- package/NPM-dist/types/component-type.js.map +1 -0
- package/NPM-dist/types/components.d.ts +1 -0
- package/NPM-dist/types/components.d.ts.map +1 -0
- package/NPM-dist/types/consent.js +1 -0
- package/NPM-dist/types/consent.js.map +1 -0
- package/NPM-dist/types/contribution.d.ts +2 -1
- package/NPM-dist/types/contribution.d.ts.map +1 -0
- package/NPM-dist/types/core.d.ts +1 -0
- package/NPM-dist/types/core.d.ts.map +1 -0
- package/NPM-dist/types/embed.d.ts +2 -1
- package/NPM-dist/types/embed.d.ts.map +1 -0
- package/NPM-dist/types/event.js +1 -0
- package/NPM-dist/types/event.js.map +1 -0
- package/NPM-dist/types/fb-instant.d.ts +1 -0
- package/NPM-dist/types/fb-instant.d.ts.map +1 -0
- package/NPM-dist/types/heatmap.d.ts +1 -0
- package/NPM-dist/types/heatmap.d.ts.map +1 -0
- package/NPM-dist/types/holidays.d.ts +2 -1
- package/NPM-dist/types/holidays.d.ts.map +1 -0
- package/NPM-dist/types/http-status.d.ts +1 -0
- package/NPM-dist/types/http-status.d.ts.map +1 -0
- package/NPM-dist/types/iframe-tracking.d.ts +1 -0
- package/NPM-dist/types/iframe-tracking.d.ts.map +1 -0
- package/NPM-dist/types/index.d.ts +199 -0
- package/NPM-dist/types/index.d.ts.map +1 -0
- package/NPM-dist/types/inpageclick.js +1 -0
- package/NPM-dist/types/inpageclick.js.map +1 -0
- package/NPM-dist/types/interaction.js +1 -0
- package/NPM-dist/types/interaction.js.map +1 -0
- package/NPM-dist/types/interactive.d.ts +1 -0
- package/NPM-dist/types/interactive.d.ts.map +1 -0
- package/NPM-dist/types/jobs-courses.d.ts +2 -1
- package/NPM-dist/types/jobs-courses.d.ts.map +1 -0
- package/NPM-dist/types/jobs.d.ts +2 -1
- package/NPM-dist/types/jobs.d.ts.map +1 -0
- package/NPM-dist/types/link.js +1 -0
- package/NPM-dist/types/link.js.map +1 -0
- package/NPM-dist/types/media.js +1 -0
- package/NPM-dist/types/media.js.map +1 -0
- package/NPM-dist/types/membership.d.ts +2 -1
- package/NPM-dist/types/membership.d.ts.map +1 -0
- package/NPM-dist/types/ng.d.ts +2 -13
- package/NPM-dist/types/ng.d.ts.map +1 -0
- package/NPM-dist/types/perf.d.ts +2 -1
- package/NPM-dist/types/perf.d.ts.map +1 -0
- package/NPM-dist/types/platform.js +1 -0
- package/NPM-dist/types/platform.js.map +1 -0
- package/NPM-dist/types/printproduct.js +1 -0
- package/NPM-dist/types/printproduct.js.map +1 -0
- package/NPM-dist/types/privatebrowsing.d.ts +1 -0
- package/NPM-dist/types/privatebrowsing.d.ts.map +1 -0
- package/NPM-dist/types/product.js +1 -0
- package/NPM-dist/types/product.js.map +1 -0
- package/NPM-dist/types/r2.d.ts +1 -0
- package/NPM-dist/types/r2.d.ts.map +1 -0
- package/NPM-dist/types/smart-news.d.ts +2 -1
- package/NPM-dist/types/smart-news.d.ts.map +1 -0
- package/NPM-dist/types/subscription.js +1 -0
- package/NPM-dist/types/subscription.js.map +1 -0
- package/NPM-dist/types/tests/attention.test.d.ts +1 -0
- package/NPM-dist/types/tests/attention.test.d.ts.map +1 -0
- package/NPM-dist/types/tests/click-path-capture.test.d.ts +1 -0
- package/NPM-dist/types/tests/click-path-capture.test.d.ts.map +1 -0
- package/NPM-dist/types/tests/components.test.d.ts +1 -0
- package/NPM-dist/types/tests/components.test.d.ts.map +1 -0
- package/NPM-dist/types/tests/core.test.d.ts +1 -0
- package/NPM-dist/types/tests/core.test.d.ts.map +1 -0
- package/NPM-dist/types/tests/heatmap.test.d.ts +1 -0
- package/NPM-dist/types/tests/heatmap.test.d.ts.map +1 -0
- package/NPM-dist/types/tests/index.test.d.ts +2 -0
- package/NPM-dist/types/tests/index.test.d.ts.map +1 -0
- package/NPM-dist/types/tests/transmit.test.d.ts +1 -0
- package/NPM-dist/types/tests/transmit.test.d.ts.map +1 -0
- package/NPM-dist/types/transmit.d.ts +1 -0
- package/NPM-dist/types/transmit.d.ts.map +1 -0
- package/NPM-dist/types/types/abtest.d.ts +1 -0
- package/NPM-dist/types/types/abtest.d.ts.map +1 -0
- package/NPM-dist/types/types/component-event.d.ts +15 -0
- package/NPM-dist/types/types/component-event.d.ts.map +1 -0
- package/NPM-dist/types/types/component-type.d.ts +7 -0
- package/NPM-dist/types/types/component-type.d.ts.map +1 -0
- package/NPM-dist/types/types/consent.d.ts +1 -0
- package/NPM-dist/types/types/consent.d.ts.map +1 -0
- package/NPM-dist/types/types/event.d.ts +11 -0
- package/NPM-dist/types/types/event.d.ts.map +1 -0
- package/NPM-dist/types/types/inpageclick.d.ts +1 -0
- package/NPM-dist/types/types/inpageclick.d.ts.map +1 -0
- package/NPM-dist/types/types/interaction.d.ts +1 -0
- package/NPM-dist/types/types/interaction.d.ts.map +1 -0
- package/NPM-dist/types/types/link.d.ts +1 -0
- package/NPM-dist/types/types/link.d.ts.map +1 -0
- package/NPM-dist/types/types/media.d.ts +1 -0
- package/NPM-dist/types/types/media.d.ts.map +1 -0
- package/NPM-dist/types/types/platform.d.ts +1 -0
- package/NPM-dist/types/types/platform.d.ts.map +1 -0
- package/NPM-dist/types/types/printproduct.d.ts +1 -0
- package/NPM-dist/types/types/printproduct.d.ts.map +1 -0
- package/NPM-dist/types/types/product.d.ts +7 -0
- package/NPM-dist/types/types/product.d.ts.map +1 -0
- package/NPM-dist/types/types/subscription.d.ts +1 -0
- package/NPM-dist/types/types/subscription.d.ts.map +1 -0
- package/NPM-dist/types/vendor/adBlockDetectionLib.d.ts +3 -1
- package/NPM-dist/types/vendor/adBlockDetectionLib.d.ts.map +1 -0
- package/NPM-dist/types/visibility.d.ts +2 -1
- package/NPM-dist/types/visibility.d.ts.map +1 -0
- package/NPM-dist/types/witness.d.ts +2 -1
- package/NPM-dist/types/witness.d.ts.map +1 -0
- package/NPM-dist/vendor/adBlockDetectionLib.js +19 -6
- package/NPM-dist/vendor/adBlockDetectionLib.js.map +1 -0
- package/NPM-dist/visibility.js +14 -5
- package/NPM-dist/visibility.js.map +1 -0
- package/NPM-dist/witness.js +1 -0
- package/NPM-dist/witness.js.map +1 -0
- package/package.json +12 -26
- package/readme.md +112 -53
- package/src/index.ts +360 -0
- package/src/ng.ts +33 -0
- package/src/transmit.ts +176 -0
- package/src/types/abtest.ts +45 -0
- package/src/types/component-event.ts +121 -0
- package/src/types/component-type.ts +70 -0
- package/src/types/consent.ts +49 -0
- package/src/types/event.ts +116 -0
- package/src/types/inpageclick.ts +13 -0
- package/src/types/interaction.ts +19 -0
- package/src/types/link.ts +14 -0
- package/src/types/media.ts +184 -0
- package/src/types/platform.ts +32 -0
- package/src/types/printproduct.ts +53 -0
- package/src/types/product.ts +72 -0
- package/src/types/subscription.ts +70 -0
- package/NPM-dist/manage-my-account.js +0 -46
- package/NPM-dist/support.js +0 -45
- package/NPM-dist/types/manage-my-account.d.ts +0 -28
- package/NPM-dist/types/support.d.ts +0 -28
package/NPM-dist/transmit.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const canSendFromCurrentRuntime = () => typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
2
|
+
// Initialize ophanRemoteHost when needed, not at module load
|
|
3
|
+
let ophanRemoteHost;
|
|
4
|
+
const getOphanRemoteHost = () => {
|
|
5
|
+
if (!ophanRemoteHost) {
|
|
6
|
+
ophanRemoteHost =
|
|
7
|
+
typeof window !== 'undefined' && window?.ophanRemoteHost
|
|
8
|
+
? window.ophanRemoteHost
|
|
9
|
+
: 'https://ophan.theguardian.com';
|
|
10
|
+
}
|
|
11
|
+
return ophanRemoteHost;
|
|
12
|
+
};
|
|
2
13
|
/**
|
|
3
14
|
* Generates a unique page view ID.
|
|
4
15
|
* @returns {string}
|
|
@@ -17,7 +28,7 @@ else {
|
|
|
17
28
|
const bumpViewId = () => {
|
|
18
29
|
const viewIdGen = generatePageViewId();
|
|
19
30
|
viewId = viewIdGen;
|
|
20
|
-
if (typeof guardian !== 'undefined') {
|
|
31
|
+
if (typeof guardian !== 'undefined' && guardian.config?.ophan) {
|
|
21
32
|
guardian.config.ophan.pageViewId = viewIdGen;
|
|
22
33
|
}
|
|
23
34
|
};
|
|
@@ -26,7 +37,7 @@ const bumpViewId = () => {
|
|
|
26
37
|
* @param {Record<string, any>} obj - The data to be sent.
|
|
27
38
|
*/
|
|
28
39
|
const sendInitial = (obj) => {
|
|
29
|
-
send(`${
|
|
40
|
+
send(`${getOphanRemoteHost()}/img/1?${buildQueryString(obj)}`);
|
|
30
41
|
};
|
|
31
42
|
/**
|
|
32
43
|
* Encodes a value for URL transmission.
|
|
@@ -60,7 +71,7 @@ const sendMore = (obj, f) => {
|
|
|
60
71
|
if (values.length === 0) {
|
|
61
72
|
return;
|
|
62
73
|
}
|
|
63
|
-
const url = `${
|
|
74
|
+
const url = `${getOphanRemoteHost()}/img/2?viewId=${viewId}&${values.join('&')}`;
|
|
64
75
|
send(url, f);
|
|
65
76
|
};
|
|
66
77
|
/**
|
|
@@ -97,6 +108,10 @@ const buildQueryString = (obj) => {
|
|
|
97
108
|
* @param {() => void} [f] - An optional callback function.
|
|
98
109
|
*/
|
|
99
110
|
const send = (url, f) => {
|
|
111
|
+
if (!canSendFromCurrentRuntime()) {
|
|
112
|
+
f?.();
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
100
115
|
if (typeof fetch === 'function') {
|
|
101
116
|
fetch(url, {
|
|
102
117
|
method: 'GET',
|
|
@@ -121,7 +136,9 @@ const send = (url, f) => {
|
|
|
121
136
|
export default {
|
|
122
137
|
sendInitial,
|
|
123
138
|
sendMore,
|
|
124
|
-
get viewId() {
|
|
139
|
+
get viewId() {
|
|
140
|
+
return viewId;
|
|
141
|
+
},
|
|
125
142
|
bumpViewId,
|
|
126
143
|
};
|
|
127
144
|
/**
|
|
@@ -133,3 +150,4 @@ export const _testExports = {
|
|
|
133
150
|
isDefined,
|
|
134
151
|
buildQueryString,
|
|
135
152
|
};
|
|
153
|
+
//# sourceMappingURL=transmit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transmit.js","sourceRoot":"","sources":["../src/transmit.ts"],"names":[],"mappings":"AAEA,MAAM,yBAAyB,GAAG,GAAY,EAAE,CAC/C,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,CAAC;AAElE,6DAA6D;AAC7D,IAAI,eAAuB,CAA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I,KAAK,CAAC,QAAQ,EAAE,CAAC;gBACpB,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;oBAC7B,CAAC,EAAE,CAAC;gBACL,CAAC;gBACD,aAAa,CAAC,OAAO,CAAC,CAAC;YACxB,CAAC;QACF,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe;IACd,WAAW;IACX,QAAQ;IACR,IAAI,MAAM;QACT,OAAO,MAAM,CAAC;IACf,CAAC;IACD,UAAU;CACV,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,kBAAkB;IAClB,WAAW;IACX,SAAS;IACT,gBAAgB;CAChB,CAAC"}
|
package/NPM-dist/types/abtest.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abtest.js","sourceRoot":"","sources":["../../src/types/abtest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adblock-detection.d.ts","sourceRoot":"","sources":["../../src/adblock-detection.js"],"names":[],"mappings":";IAKC,6BAqBC"}
|
|
@@ -7,3 +7,4 @@ export default _default;
|
|
|
7
7
|
declare function initAttention(visibility: any): void;
|
|
8
8
|
declare function initComponent(name: any, el: any, visibilityThreshold?: number, isTrackingVideo?: boolean): void;
|
|
9
9
|
declare function setEventEmitter(emitter: any): void;
|
|
10
|
+
//# sourceMappingURL=attention.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["../../src/attention.js"],"names":[],"mappings":";;;;;;AA2JA,sDAsCC;AArDD,kHAaC;AA0CD,qDAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaign.d.ts","sourceRoot":"","sources":["../../src/campaign.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"click-path-capture.d.ts","sourceRoot":"","sources":["../../src/click-path-capture.js"],"names":[],"mappings":"AASO,+CAHI,OAAO,GACL,OAAO,GAAC,IAAI,CAOxB;AAQM,2CAHI,OAAO,GACL,MAAM,GAAC,IAAI,CAOvB;AAyBM,kDAFI,OAAO,QA0BjB;;;;;;AA/CD;;;;;;GAMG;AACH,sCAJW,OAAO,kBACP,MAAM,EAAE,GACN,MAAM,EAAE,CAUpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-event.js","sourceRoot":"","sources":["../../src/types/component-event.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-type.js","sourceRoot":"","sources":["../../src/types/component-type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/components.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,yBAFU,SAAS,EAAE,CAEQ;;;;;;kCAwLlB,CAAC,GAAG,IAAI,qIAAyC,KAAK,IAAI;;;AAlJrE;IACC;;;;;;;;;;;OAWG;IACH,kBAVW,MAAM,WACN,WAAW,uBACX,MAAM,qBAKN,MAAM,oBACN,OAAO,EAoBjB;IAjBA,aAAgB;IAChB,qBAAsB;IACtB,4BAA8C;IAC9C,0BAA0C;IAC1C,yBAAsC;IACtC,iBAAoB;IAEpB,yBAAyB;IAKzB,0CAAsC;IAEtC,iCAAiC;IAKlC,gDAWC;IAED,mBAIC;IAED,qBAGC;IAED,sDAaC;IAED,oCAGC;IAED,2BAIC;CACD;AAED;;;;;;GAMG;AACH,gEAIC;AAED;;;GAGG;AACH,yCAEC;AAED;;;;;;GAMG;AACH,uDAUC;AAED;;;GAGG;AACH,sCAFa,MAAM,CAWlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent.js","sourceRoot":"","sources":["../../src/types/consent.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
let record: (obj: import("./
|
|
2
|
+
let record: (obj: import("./index.js").EventPayload, f?: (() => void) | undefined) => void;
|
|
3
3
|
const viewId: string;
|
|
4
4
|
}
|
|
5
5
|
export default _default;
|
|
6
|
+
//# sourceMappingURL=contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution.d.ts","sourceRoot":"","sources":["../../src/contribution.js"],"names":[],"mappings":""}
|
package/NPM-dist/types/core.d.ts
CHANGED
|
@@ -62,3 +62,4 @@ declare function processCaptures(): void;
|
|
|
62
62
|
* @param {Record<string, unknown>} localGuardian - The guardian object.
|
|
63
63
|
*/
|
|
64
64
|
declare function appendContentType(event: Record<string, unknown>, localPlatform: string, localGuardian: Record<string, unknown>): void;
|
|
65
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.js"],"names":[],"mappings":";;;;IA8SkB,uCAEhB;;;;;;;;;;;;;;AAhTE,sBAAI;AAEP,4CAA0B;AAiK3B;;;;;;;GAOG;AACH,4CAHW,MAAM,OAAO,MAAM,EAAE,OAAO,CAAC,QAUvC;AAjLA,kCAAgB;AAkPjB;;;;GAIG;AACH,mDAFW,MAAM,QAgBhB;AAjCD;;;;;GAKG;AACH,mEAHW,MAAM,EAAE,GACN,MAAM,EAAE,CAQpB;AA5KD;;;;;;GAMG;AACH,mDAHW,MAAM,GACJ,MAAM,GAAG,SAAS,CAa9B;AA0ED,oCAA0B;AAmB1B;;;GAGG;AACH,yCAiBC;AAgFD;;;;;GAKG;AACH,0CAJW,OAAO,MAAM,EAAE,OAAO,CAAC,iBACvB,MAAM,iBACN,OAAO,MAAM,EAAE,OAAO,CAAC,QAWjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
let record: (obj: import("./
|
|
2
|
+
let record: (obj: import("./index.js").EventPayload, f?: (() => void) | undefined) => void;
|
|
3
3
|
const viewId: string;
|
|
4
4
|
}
|
|
5
5
|
export default _default;
|
|
6
|
+
//# sourceMappingURL=embed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../src/embed.js"],"names":[],"mappings":""}
|
package/NPM-dist/types/event.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/types/event.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fb-instant.d.ts","sourceRoot":"","sources":["../../src/fb-instant.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heatmap.d.ts","sourceRoot":"","sources":["../../src/heatmap.js"],"names":[],"mappings":";;;;AAEA,yJAgDC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
let record: (obj: import("./
|
|
2
|
+
let record: (obj: import("./index.js").EventPayload, f?: (() => void) | undefined) => void;
|
|
3
3
|
const viewId: string;
|
|
4
4
|
}
|
|
5
5
|
export default _default;
|
|
6
|
+
//# sourceMappingURL=holidays.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"holidays.d.ts","sourceRoot":"","sources":["../../src/holidays.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-status.d.ts","sourceRoot":"","sources":["../../src/http-status.js"],"names":[],"mappings":";;;;AAMA,+DAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iframe-tracking.d.ts","sourceRoot":"","sources":["../../src/iframe-tracking.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import './click-path-capture.js';
|
|
2
|
+
import './perf.js';
|
|
3
|
+
import './iframe-tracking.js';
|
|
4
|
+
import './campaign.js';
|
|
5
|
+
import { EventPayload } from './types/event.js';
|
|
6
|
+
/**
|
|
7
|
+
* Product surface that is initialising the tracker.
|
|
8
|
+
*
|
|
9
|
+
* The platform controls the historical Ophan serving-platform value and any
|
|
10
|
+
* platform-specific browser integrations started by `init()`.
|
|
11
|
+
*/
|
|
12
|
+
export type Platform = 'ng' | 'manage-my-account' | 'support';
|
|
13
|
+
/**
|
|
14
|
+
* Initialise the Ophan tracker for a specific platform.
|
|
15
|
+
*
|
|
16
|
+
* Call this once, eagerly, in a browser context before using the other tracker
|
|
17
|
+
* methods. Initialisation sends the first page-view event.
|
|
18
|
+
*
|
|
19
|
+
* @param platform - The platform identifier ('ng' for next-gen Guardian sites, 'manage-my-account', or 'support'). Defaults to 'ng'.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```javascript
|
|
23
|
+
* import { init } from '@guardian/ophan-tracker-js';
|
|
24
|
+
* init('ng');
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const init: (platform?: Platform) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Send a new page-view event to Ophan.
|
|
30
|
+
*
|
|
31
|
+
* This generates a new view ID and tracks the current page.
|
|
32
|
+
* `init()` already sends the first page-view event, so call this only when
|
|
33
|
+
* intentionally creating another page view, such as after a single-page app
|
|
34
|
+
* route change.
|
|
35
|
+
*
|
|
36
|
+
* @param url - The page URL to track (defaults to current location)
|
|
37
|
+
* @param referrer - The referrer URL (defaults to document.referrer)
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```javascript
|
|
41
|
+
* import { sendInitialEvent } from '@guardian/ophan-tracker-js';
|
|
42
|
+
* sendInitialEvent('https://www.theguardian.com/article', 'https://google.com');
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const sendInitialEvent: (url?: string, referrer?: string) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Record an event against the current page view.
|
|
48
|
+
*
|
|
49
|
+
* Use this for component interactions, purchases, subscriptions, media events,
|
|
50
|
+
* consent events, and other non-page-view payloads. `init()` must have run
|
|
51
|
+
* first so the event is associated with a valid page view and platform.
|
|
52
|
+
*
|
|
53
|
+
* @param event - The event data payload containing metrics and metadata
|
|
54
|
+
* @param callback - Optional callback function executed after the event is sent
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```javascript
|
|
58
|
+
* import { record } from '@guardian/ophan-tracker-js';
|
|
59
|
+
*
|
|
60
|
+
* // Track a component interaction
|
|
61
|
+
* record({
|
|
62
|
+
* componentEvent: {
|
|
63
|
+
* component: {
|
|
64
|
+
* componentType: 'ACQUISITIONS_ENGAGEMENT_BANNER',
|
|
65
|
+
* id: 'end-of-article-banner',
|
|
66
|
+
* campaignCode: '2024-annual-campaign',
|
|
67
|
+
* labels: ['end-of-article']
|
|
68
|
+
* },
|
|
69
|
+
* action: 'CLICK',
|
|
70
|
+
* abTest: {
|
|
71
|
+
* name: 'BannerTest',
|
|
72
|
+
* variant: 'control'
|
|
73
|
+
* }
|
|
74
|
+
* }
|
|
75
|
+
* });
|
|
76
|
+
*
|
|
77
|
+
* // Track a rendered component list
|
|
78
|
+
* record({
|
|
79
|
+
* renderedComponents: ['nav', 'footer']
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export declare const record: (event: EventPayload, callback?: () => void) => void;
|
|
84
|
+
/**
|
|
85
|
+
* Track component attention and visibility analytics.
|
|
86
|
+
*
|
|
87
|
+
* Monitors when components enter and leave the viewport.
|
|
88
|
+
*
|
|
89
|
+
* @param name - Unique identifier for the component
|
|
90
|
+
* @param el - The DOM element to track
|
|
91
|
+
* @param visibilityThreshold - Percentage of element that must be visible (0-1)
|
|
92
|
+
* @param isTrackingVideo - Whether this component contains video content
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```javascript
|
|
96
|
+
* import { trackComponentAttention } from '@guardian/ophan-tracker-js';
|
|
97
|
+
*
|
|
98
|
+
* const banner = document.getElementById('promo-banner');
|
|
99
|
+
* trackComponentAttention('promo-banner', banner, 0.5);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare const trackComponentAttention: (name: string, el: HTMLElement, visibilityThreshold: number, isTrackingVideo?: boolean) => void;
|
|
103
|
+
/**
|
|
104
|
+
* Set a custom event emitter for attention tracking.
|
|
105
|
+
*
|
|
106
|
+
* This is primarily for integrations that need to bridge the tracker's
|
|
107
|
+
* attention events into an existing event system.
|
|
108
|
+
*
|
|
109
|
+
* @param event - Event emitter object with emit/on methods
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```javascript
|
|
113
|
+
* import { setEventEmitter } from '@guardian/ophan-tracker-js';
|
|
114
|
+
*
|
|
115
|
+
* const customEmitter = new EventEmitter();
|
|
116
|
+
* setEventEmitter(customEmitter);
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export declare const setEventEmitter: (event: Object) => void;
|
|
120
|
+
/**
|
|
121
|
+
* Manually track a click event on an element with data-link-name or data-component attributes.
|
|
122
|
+
* This captures click path information and component context for analytics.
|
|
123
|
+
* Useful for elements that stop event propagation or need explicit tracking.
|
|
124
|
+
*
|
|
125
|
+
* @param element - The clicked DOM element (should have data-link-name or data-component attributes)
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```javascript
|
|
129
|
+
* import { trackClickComponentEvent } from '@guardian/ophan-tracker-js';
|
|
130
|
+
*
|
|
131
|
+
* // Track a click on an element with tracking attributes
|
|
132
|
+
* const link = document.querySelector('a[data-link-name="subscribe-button"]');
|
|
133
|
+
* trackClickComponentEvent(link);
|
|
134
|
+
*
|
|
135
|
+
* // Or track a button inside a component
|
|
136
|
+
* const button = document.querySelector('[data-component="newsletter-signup"] button');
|
|
137
|
+
* trackClickComponentEvent(button);
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export declare const trackClickComponentEvent: (element: Element) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Generate a new page view ID for the current browser session.
|
|
143
|
+
*
|
|
144
|
+
* Useful for single-page applications when navigating between pages.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```javascript
|
|
148
|
+
* import { bumpViewId } from '@guardian/ophan-tracker-js';
|
|
149
|
+
*
|
|
150
|
+
* // Call when navigating to a new page in SPA
|
|
151
|
+
* bumpViewId();
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export declare const bumpViewId: () => void;
|
|
155
|
+
/**
|
|
156
|
+
* Return the current live Ophan page view ID.
|
|
157
|
+
*
|
|
158
|
+
* Prefer this function over destructuring `viewId` from the default export,
|
|
159
|
+
* because the value changes after `bumpViewId()` or `sendInitialEvent()`.
|
|
160
|
+
*/
|
|
161
|
+
export declare const getViewId: () => string;
|
|
162
|
+
/**
|
|
163
|
+
* Alias for `getViewId()` kept for consumers that use page-view terminology.
|
|
164
|
+
*/
|
|
165
|
+
export declare const getPageViewId: () => string;
|
|
166
|
+
/**
|
|
167
|
+
* Object-shaped tracker API exposed by the package default export.
|
|
168
|
+
*
|
|
169
|
+
* Named exports are preferred for new code, but the default export keeps the
|
|
170
|
+
* historical object-style API and exposes `viewId`/`pageViewId` as live getters.
|
|
171
|
+
*/
|
|
172
|
+
export interface OphanTracker {
|
|
173
|
+
init: (platform?: Platform) => void;
|
|
174
|
+
sendInitialEvent: (url?: string, referrer?: string) => void;
|
|
175
|
+
record: (event: EventPayload, callback?: () => void) => void;
|
|
176
|
+
trackComponentAttention: (name: string, el: HTMLElement, visibilityThreshold: number, isTrackingVideo?: boolean) => void;
|
|
177
|
+
setEventEmitter: (event: Object) => void;
|
|
178
|
+
trackClickComponentEvent: (element: Element) => void;
|
|
179
|
+
bumpViewId: () => void;
|
|
180
|
+
getViewId: () => string;
|
|
181
|
+
getPageViewId: () => string;
|
|
182
|
+
viewId: string;
|
|
183
|
+
pageViewId: string;
|
|
184
|
+
}
|
|
185
|
+
declare const ophanTracker: OphanTracker;
|
|
186
|
+
export default ophanTracker;
|
|
187
|
+
export * from './types/abtest.js';
|
|
188
|
+
export * from './types/subscription.js';
|
|
189
|
+
export * from './types/interaction.js';
|
|
190
|
+
export * from './types/inpageclick.js';
|
|
191
|
+
export * from './types/printproduct.js';
|
|
192
|
+
export * from './types/product.js';
|
|
193
|
+
export * from './types/platform.js';
|
|
194
|
+
export * from './types/media.js';
|
|
195
|
+
export * from './types/consent.js';
|
|
196
|
+
export * from './types/component-type.js';
|
|
197
|
+
export * from './types/component-event.js';
|
|
198
|
+
export * from './types/event.js';
|
|
199
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,yBAAyB,CAAC;AACjC,OAAO,WAAW,CAAC;AACnB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,mBAAmB,GAAG,SAAS,CAAC;AA2B9D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,IAAI,cAAc,QAAQ,KAAU,IAqChD,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,SACvB,MAAM,aACD,MAAM,KAId,IAWF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,MAAM,UAAW,YAAY,aAAa,MAAM,IAAI,KAAG,IAanE,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,uBAAuB,SAC7B,MAAM,MACR,WAAW,uBACM,MAAM,oBACT,OAAO,K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BAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inpageclick.js","sourceRoot":"","sources":["../../src/types/inpageclick.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../src/types/interaction.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../src/interactive.js"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
let record: (obj: import("./
|
|
2
|
+
let record: (obj: import("./index.js").EventPayload, f?: (() => void) | undefined) => void;
|
|
3
3
|
const viewId: string;
|
|
4
4
|
}
|
|
5
5
|
export default _default;
|
|
6
|
+
//# sourceMappingURL=jobs-courses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs-courses.d.ts","sourceRoot":"","sources":["../../src/jobs-courses.js"],"names":[],"mappings":""}
|
package/NPM-dist/types/jobs.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
let record: (obj: import("./
|
|
2
|
+
let record: (obj: import("./index.js").EventPayload, f?: (() => void) | undefined) => void;
|
|
3
3
|
const viewId: string;
|
|
4
4
|
}
|
|
5
5
|
export default _default;
|
|
6
|
+
//# sourceMappingURL=jobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/jobs.js"],"names":[],"mappings":""}
|
package/NPM-dist/types/link.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/types/link.ts"],"names":[],"mappings":""}
|
package/NPM-dist/types/media.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/types/media.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
let record: (obj: import("./
|
|
2
|
+
let record: (obj: import("./index.js").EventPayload, f?: (() => void) | undefined) => void;
|
|
3
3
|
const viewId: string;
|
|
4
4
|
}
|
|
5
5
|
export default _default;
|
|
6
|
+
//# sourceMappingURL=membership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"membership.d.ts","sourceRoot":"","sources":["../../src/membership.js"],"names":[],"mappings":""}
|
package/NPM-dist/types/ng.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import './click-path-capture.js';
|
|
2
|
-
import './perf.js';
|
|
3
|
-
import './iframe-tracking.js';
|
|
4
1
|
export * from './types/abtest.js';
|
|
5
2
|
export * from './types/subscription.js';
|
|
6
3
|
export * from './types/interaction.js';
|
|
@@ -13,14 +10,6 @@ export * from './types/consent.js';
|
|
|
13
10
|
export * from './types/component-type.js';
|
|
14
11
|
export * from './types/component-event.js';
|
|
15
12
|
export * from './types/event.js';
|
|
16
|
-
|
|
17
|
-
interface NG {
|
|
18
|
-
record: (event: EventPayload, callback?: Function) => void;
|
|
19
|
-
pageViewId: string;
|
|
20
|
-
viewId: string;
|
|
21
|
-
trackComponentAttention: (name: string, el: HTMLElement, visibilityThreshold: number, isTrackingVideo?: boolean) => void;
|
|
22
|
-
setEventEmitter: (event: Object) => void;
|
|
23
|
-
trackClickComponentEvent: (element: Element) => void;
|
|
24
|
-
}
|
|
25
|
-
declare let ng: NG;
|
|
13
|
+
declare const ng: import("./index.js").OphanTracker;
|
|
26
14
|
export default ng;
|
|
15
|
+
//# sourceMappingURL=ng.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng.d.ts","sourceRoot":"","sources":["../../src/ng.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AAWjC,QAAA,MAAM,EAAE,mCAA+C,CAAC;AAQxD,eAAe,EAAE,CAAC"}
|
package/NPM-dist/types/perf.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perf.d.ts","sourceRoot":"","sources":["../../src/perf.js"],"names":[],"mappings":";AAGA,uCAKS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/types/platform.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"printproduct.js","sourceRoot":"","sources":["../../src/types/printproduct.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privatebrowsing.d.ts","sourceRoot":"","sources":["../../src/privatebrowsing.js"],"names":[],"mappings":";IA6DC,6BAOC;;;;AA7DF,0DAmDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/types/product.ts"],"names":[],"mappings":""}
|
package/NPM-dist/types/r2.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"r2.d.ts","sourceRoot":"","sources":["../../src/r2.js"],"names":[],"mappings":""}
|