@guardian/ophan-tracker-js 3.0.0 → 4.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.
|
@@ -37,14 +37,6 @@ interface PageView {
|
|
|
37
37
|
tz?: string;
|
|
38
38
|
visibilityState?: string;
|
|
39
39
|
}
|
|
40
|
-
export interface AttentionTime {
|
|
41
|
-
/** Attention time spent on this page view in milliseconds */
|
|
42
|
-
attentionMs: number;
|
|
43
|
-
/** Map of component name to time in ms */
|
|
44
|
-
componentAttention?: {
|
|
45
|
-
[key: string]: number;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
40
|
interface AssetPerformanceData {
|
|
49
41
|
/** The name of the metric being captured */
|
|
50
42
|
name: string;
|
|
@@ -86,7 +78,12 @@ export interface EventPayload extends Partial<Consent>, Partial<InPageClick> {
|
|
|
86
78
|
/** If the user is logged in, the identity user id */
|
|
87
79
|
userId?: string;
|
|
88
80
|
pageView?: PageView;
|
|
89
|
-
|
|
81
|
+
/** Attention time spent on this page view in milliseconds */
|
|
82
|
+
attentionMs?: number;
|
|
83
|
+
/** Map of component name to time in ms */
|
|
84
|
+
componentAttentionMs?: {
|
|
85
|
+
[key: string]: number;
|
|
86
|
+
};
|
|
90
87
|
performance?: WebPerformanceData;
|
|
91
88
|
audio?: AudioEvent;
|
|
92
89
|
video?: VideoEvent;
|
|
@@ -35,7 +35,11 @@ export type TVideoEventType =
|
|
|
35
35
|
/**
|
|
36
36
|
* The media has been paused before the end.
|
|
37
37
|
**/
|
|
38
|
-
| "video:content:pause"
|
|
38
|
+
| "video:content:pause"
|
|
39
|
+
/**
|
|
40
|
+
* The media player has resumed playing from a paused state.
|
|
41
|
+
**/
|
|
42
|
+
| "video:content:resume" | "video:content:skip" | "video:content:cued"
|
|
39
43
|
/**
|
|
40
44
|
* The media has been muted.
|
|
41
45
|
*/
|