@24i/bigscreen-sdk 1.0.51-alpha.2793 → 1.0.52

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24i/bigscreen-sdk",
3
- "version": "1.0.51-alpha.2793",
3
+ "version": "1.0.52",
4
4
  "description": "SmartApps BIGscreen SDK monorepo",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -42,7 +42,7 @@
42
42
  "@24i/appstage-shared-events-manager": "1.0.11",
43
43
  "@24i/appstage-shared-perf-utils": "1.0.11",
44
44
  "@24i/bigscreen-players-engine-base": "4.1.0",
45
- "@24i/smartapps-datalayer": "3.0.18",
45
+ "@24i/smartapps-datalayer": "3.0.21",
46
46
  "@sentry/browser": "7.35.0",
47
47
  "@sentry/types": "7.35.0",
48
48
  "csstype": "^3.1.3",
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
2
- import { getAssetId } from '../helper';
3
2
  import { Payload, AdLoadedResult } from '../types';
4
3
  import { mapBase } from './mapBase';
5
4
 
@@ -7,7 +6,8 @@ export const mapAdLoaded = (triggerName: AnalyticsTriggers, payload: Payload): A
7
6
  ...mapBase(payload),
8
7
  action: triggerName,
9
8
  event_trigger: triggerName,
10
- thing_id: getAssetId(payload.sceneId),
9
+ thing_id: payload.assetId || '',
10
+ attribution_id: payload.attributionId || '',
11
11
  player_advertisment_name: '', // TODO: adPayload?.adName,
12
12
  player_advertisment_position: 0, // TODO: adPayload?.adPosition,
13
13
  });
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
2
- import { getAssetId } from '../helper';
3
2
  import { Payload, AdSkippedResult } from '../types';
4
3
  import { mapBase } from './mapBase';
5
4
 
@@ -10,7 +9,8 @@ export const mapAdSkipped = (
10
9
  ...mapBase(payload),
11
10
  action: triggerName,
12
11
  event_trigger: triggerName,
13
- thing_id: getAssetId(payload.sceneId),
12
+ thing_id: payload.assetId || '',
13
+ attribution_id: payload.attributionId || '',
14
14
  player_advertisment_name: '', // TODO: adPayload?.adName,
15
15
  player_advertisment_position: 0, // TODO: adPayload?.adPosition,
16
16
  });
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
2
- import { getAssetId } from '../helper';
3
2
  import { Payload, BufferingResult } from '../types';
4
3
  import { mapBase } from './mapBase';
5
4
 
@@ -10,6 +9,7 @@ export const mapBuffering = (
10
9
  ...mapBase(payload),
11
10
  action: triggerName,
12
11
  event_trigger: triggerName,
13
- thing_id: getAssetId(payload.sceneId),
12
+ thing_id: payload.assetId || '',
13
+ attribution_id: payload.attributionId || '',
14
14
  source_page: payload.sceneName,
15
15
  });
@@ -3,7 +3,6 @@ import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
3
3
  import { EVENTS, HUNDRED_PERCENT } from '../constants';
4
4
  import { PlayerCloseResult, Payload } from '../types';
5
5
  import { mapBase } from './mapBase';
6
- import { getAssetId } from '../helper';
7
6
 
8
7
  export const mapPlayerClose = (
9
8
  triggerName: AnalyticsTriggers,
@@ -17,7 +16,8 @@ export const mapPlayerClose = (
17
16
  ...mapBase(payload),
18
17
  action: EVENTS.PLAYER_CLOSE,
19
18
  event_trigger: triggerName,
20
- thing_id: getAssetId(payload.sceneId),
19
+ thing_id: payload.assetId || '',
20
+ attribution_id: payload.attributionId || '',
21
21
  duration,
22
22
  progress_pct: progressPercent,
23
23
  };
@@ -1,7 +1,5 @@
1
1
  import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
2
2
  import { DefaultScreens } from '../constants';
3
- import { getAssetId } from '../helper';
4
-
5
3
  import { PlayerOpenResult, Payload } from '../types';
6
4
  import { mapBase } from './mapBase';
7
5
 
@@ -13,6 +11,7 @@ export const mapPlayerOpen = (
13
11
  action: triggerName,
14
12
  event_trigger: triggerName,
15
13
  source_page: DefaultScreens.PLAYBACK,
16
- thing_id: getAssetId(payload.sceneId),
14
+ thing_id: payload.assetId || '',
15
+ attribution_id: payload.attributionId || '',
17
16
  source_rail: '', // TODO: payload.payload.asset.sectionLabel,
18
17
  });
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
2
- import { getAssetId } from '../helper';
3
2
  import { Payload, SceneViewResult } from '../types';
4
3
  import { mapBase } from './mapBase';
5
4
 
@@ -11,5 +10,6 @@ export const mapSceneView = (
11
10
  action: triggerName,
12
11
  event_trigger: triggerName,
13
12
  source_page: payload.sceneName,
14
- thing_id: getAssetId(payload.sceneId),
13
+ thing_id: payload.assetId || '',
14
+ attribution_id: payload.attributionId || '',
15
15
  });
@@ -1,6 +1,5 @@
1
1
  import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
2
2
  import { EVENTS } from '../constants';
3
- import { getAssetId } from '../helper';
4
3
  import { Payload, ScrollResult } from '../types';
5
4
  import { mapBase } from './mapBase';
6
5
 
@@ -11,7 +10,8 @@ export const mapScroll = (triggerName: AnalyticsTriggers, payload: Payload): Scr
11
10
  action: EVENTS.SCROLL,
12
11
  event_trigger: triggerName,
13
12
  source_page: payload.sceneName,
14
- thing_id: getAssetId(payload.sceneId),
13
+ thing_id: payload.assetId || '',
14
+ attribution_id: payload.attributionId || '',
15
15
  percent_scrolled: percentScrolled,
16
16
  };
17
17
  };
@@ -3,7 +3,6 @@ import { SECOND_IN_MS } from '@24i/bigscreen-sdk/utils';
3
3
  import { EVENTS } from '../constants';
4
4
  import { Payload, VideoCompleteResult } from '../types';
5
5
  import { mapBase } from './mapBase';
6
- import { getAssetId } from '../helper';
7
6
 
8
7
  export const mapVideoComplete = (
9
8
  triggerName: AnalyticsTriggers,
@@ -14,7 +13,8 @@ export const mapVideoComplete = (
14
13
  ...mapBase(payload),
15
14
  action: EVENTS.VIDEO_COMPLETE,
16
15
  event_trigger: triggerName,
17
- thing_id: getAssetId(payload.sceneId),
16
+ thing_id: payload.assetId || '',
17
+ attribution_id: payload.attributionId || '',
18
18
  progress_pct: 90,
19
19
  duration: assetDuration,
20
20
  };
@@ -3,7 +3,6 @@ import { SECOND_IN_MS } from '@24i/bigscreen-sdk/utils';
3
3
  import { EVENTS, HUNDRED_PERCENT } from '../constants';
4
4
  import { VideoPauseResult, Payload } from '../types';
5
5
  import { mapBase } from './mapBase';
6
- import { getAssetId } from '../helper';
7
6
 
8
7
  export const mapVideoPause = (
9
8
  triggerName: AnalyticsTriggers,
@@ -17,7 +16,8 @@ export const mapVideoPause = (
17
16
  ...mapBase(payload),
18
17
  action: EVENTS.VIDEO_PAUSE,
19
18
  event_trigger: triggerName,
20
- thing_id: getAssetId(payload.sceneId),
19
+ thing_id: payload.assetId || '',
20
+ attribution_id: payload.attributionId || '',
21
21
  duration: overallDuration,
22
22
  progress_pct: progressPercent,
23
23
  };
@@ -3,7 +3,6 @@ import { SECOND_IN_MS } from '@24i/bigscreen-sdk/utils';
3
3
  import { Payload, VideoProgressResult } from '../types';
4
4
  import { EVENTS, HUNDRED_PERCENT } from '../constants';
5
5
  import { mapBase } from './mapBase';
6
- import { getAssetId } from '../helper';
7
6
 
8
7
  export const mapVideoProgress = (
9
8
  triggerName: AnalyticsTriggers,
@@ -17,7 +16,8 @@ export const mapVideoProgress = (
17
16
  ...mapBase(payload),
18
17
  action: EVENTS.VIDEO_PROGRESS,
19
18
  event_trigger: triggerName,
20
- thing_id: getAssetId(payload.sceneId),
19
+ thing_id: payload.assetId || '',
20
+ attribution_id: payload.attributionId || '',
21
21
  progress_pct: progressPercent,
22
22
  duration: durationInSeconds,
23
23
  };
@@ -4,7 +4,6 @@ import { SECOND_IN_MS } from '@24i/bigscreen-sdk/utils';
4
4
  import { DefaultScreens, EVENTS } from '../constants';
5
5
  import { VideoStartResult, Payload } from '../types';
6
6
  import { mapBase } from './mapBase';
7
- import { getAssetId } from '../helper';
8
7
 
9
8
  const HUNDRED_PERCENT = 100;
10
9
 
@@ -25,7 +24,8 @@ export const mapVideoStart = (
25
24
  ...mapBase(payload),
26
25
  action: EVENTS.VIDEO_START,
27
26
  event_trigger: triggerName,
28
- thing_id: getAssetId(payload.sceneId),
27
+ thing_id: payload.assetId || '',
28
+ attribution_id: payload.attributionId || '',
29
29
  duration: assetDuration,
30
30
  progress_pct: progressPercent,
31
31
  source_page: DefaultScreens.PLAYBACK,
@@ -4,7 +4,6 @@ import { PropertyType } from '@24i/smartapps-datalayer/models';
4
4
  import { DefaultScreens, EVENTS, HUNDRED_PERCENT } from '../constants';
5
5
  import { Payload, VideoStopResult } from '../types';
6
6
  import { mapBase } from './mapBase';
7
- import { getAssetId } from '../helper';
8
7
 
9
8
  export const mapVideoStop = (
10
9
  triggerName: AnalyticsTriggers,
@@ -23,7 +22,8 @@ export const mapVideoStop = (
23
22
  ...mapBase(payload),
24
23
  action: EVENTS.VIDEO_STOP,
25
24
  event_trigger: triggerName,
26
- thing_id: getAssetId(payload.sceneId),
25
+ thing_id: payload.assetId || '',
26
+ attribution_id: payload.attributionId || '',
27
27
  progress_pct: progressPercent,
28
28
  duration,
29
29
  source_page: DefaultScreens.PLAYBACK,
@@ -14,8 +14,9 @@ export interface CorePayload {
14
14
  asset?: Asset;
15
15
  source?: string;
16
16
  duration?: number;
17
- id?: string;
17
+ assetId?: string;
18
18
  percentOfPlayback?: number;
19
+ attributionId?: string;
19
20
  }
20
21
 
21
22
  export interface SessionInfo {
@@ -66,6 +67,7 @@ export type CoreResult = BaseResult & {
66
67
  export type SceneViewResult = CoreResult & {
67
68
  source_page: string;
68
69
  thing_id: string;
70
+ attribution_id: string;
69
71
  };
70
72
  export type BufferingResult = SceneViewResult;
71
73
 
@@ -74,18 +76,21 @@ export type ScrollResult = SceneViewResult & {
74
76
  };
75
77
  export type VideoProgressResult = CoreResult & {
76
78
  thing_id: string;
79
+ attribution_id: string;
77
80
  progress_pct: number;
78
81
  duration: number;
79
82
  };
80
83
 
81
84
  export type PlayerOpenResult = CoreResult & {
82
85
  thing_id: string;
86
+ attribution_id: string;
83
87
  source_page: string;
84
88
  source_rail?: string | null;
85
89
  };
86
90
 
87
91
  export type VideoStartResult = CoreResult & {
88
92
  thing_id: string;
93
+ attribution_id: string;
89
94
  duration: number;
90
95
  progress_pct: number;
91
96
  source_page: string;
@@ -94,18 +99,21 @@ export type VideoStartResult = CoreResult & {
94
99
 
95
100
  export type VideoPauseResult = CoreResult & {
96
101
  thing_id: string;
102
+ attribution_id: string;
97
103
  duration: number;
98
104
  progress_pct: number;
99
105
  };
100
106
 
101
107
  export type AdLoadedResult = CoreResult & {
102
108
  thing_id: string;
109
+ attribution_id: string;
103
110
  player_advertisment_name: string;
104
111
  player_advertisment_position: number;
105
112
  };
106
113
 
107
114
  export type AdSkippedResult = CoreResult & {
108
115
  thing_id: string;
116
+ attribution_id: string;
109
117
  player_advertisment_name: string;
110
118
  player_advertisment_position: number;
111
119
  };