@24i/bigscreen-sdk 1.0.42-alpha.2709 → 1.0.42-alpha.2710

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.42-alpha.2709",
3
+ "version": "1.0.42-alpha.2710",
4
4
  "description": "SmartApps BIGscreen SDK monorepo",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://github.com/24i/smartapps-bigscreen-sdk#readme",
40
40
  "dependencies": {
41
- "@24i/appstage-shared-analytics": "1.0.20-alpha.72",
41
+ "@24i/appstage-shared-analytics": "1.0.22",
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.0.10",
@@ -103,7 +103,7 @@ export class TealiumAnalytics implements AnalyticsClient {
103
103
  platform_type: platformType ?? BIGSCREEN_PLATFORM_TYPE,
104
104
  app_type: appType ?? BIGSCREEN_APP_TYPE,
105
105
  ott_type: BIGSCREEN_OTT_TYPE,
106
- app_id: `${entity} ${language} : ${this.appVersion}`,
106
+ app_id: `${entity} ${appType ?? BIGSCREEN_APP_TYPE} : ${this.appVersion}`,
107
107
  };
108
108
  }
109
109
 
@@ -10,6 +10,7 @@ export const BIGSCREEN_PLATFORM_TYPE = 'ott';
10
10
 
11
11
  export const TEALIUM_TRIGGERS = [
12
12
  // App
13
+ AnalyticsTriggers.APP_OPEN,
13
14
  AnalyticsTriggers.APP_CLOSE,
14
15
  AnalyticsTriggers.APP_ERROR,
15
16
 
@@ -42,6 +43,7 @@ export const TEALIUM_TRIGGERS = [
42
43
  ];
43
44
 
44
45
  export const AppEvents = {
46
+ [AnalyticsTriggers.APP_OPEN]: '',
45
47
  [AnalyticsTriggers.SCENE_VIEW]: '',
46
48
  [AnalyticsTriggers.PLAYBACK_10]: 'media_milestone_10_video',
47
49
  [AnalyticsTriggers.PLAYBACK_50]: 'media_milestone_50_video',
@@ -50,7 +52,7 @@ export const AppEvents = {
50
52
  [AnalyticsTriggers.PLAYBACK_PAUSE]: 'video_pause',
51
53
  [AnalyticsTriggers.PLAYBACK_UNPAUSE]: 'video_resume',
52
54
  [AnalyticsTriggers.PLAYBACK_START]: 'video_play',
53
- [AnalyticsTriggers.PLAYER_OPEN]: 'player_x',
55
+ [AnalyticsTriggers.PLAYER_OPEN]: 'player_open',
54
56
  [AnalyticsTriggers.PLAYER_CLOSE]: 'player_x',
55
57
  [AnalyticsTriggers.FAVORITE_ADD]: 'subscribe_to_fav',
56
58
  [AnalyticsTriggers.FAVORITE_REMOVE]: 'subscribe_to_fav',
@@ -61,6 +63,7 @@ export const AppEvents = {
61
63
  } as const;
62
64
 
63
65
  export enum EVENTS {
66
+ APP_OPEN = 'app_open',
64
67
  SCENE_VIEW = 'scene_view',
65
68
  VIDEO_PROGRESS = 'video_progress',
66
69
  VIDEO_START = 'video_start',
@@ -82,6 +85,7 @@ export enum TrackEventType {
82
85
  }
83
86
 
84
87
  export const TRIGGER_NAME_TO_TEALIUM_EVENTS: { [K in AnalyticsTriggers]?: EVENTS[]; } = {
88
+ [AnalyticsTriggers.APP_OPEN]: [EVENTS.APP_OPEN],
85
89
  [AnalyticsTriggers.SCENE_VIEW]: [EVENTS.SCENE_VIEW],
86
90
  [AnalyticsTriggers.PLAYBACK_10]: [EVENTS.VIDEO_PROGRESS],
87
91
  [AnalyticsTriggers.PLAYBACK_50]: [EVENTS.VIDEO_PROGRESS],
@@ -13,10 +13,12 @@ import { mapFavoriteRemove } from './mappers/mapFavoriteRemove';
13
13
  import { mapVideoResume } from './mappers/mapVideoResume';
14
14
  import { mapSearchSuccess } from './mappers/mapSearchSuccess';
15
15
  import { mapSearchFailed } from './mappers/mapSearchFailed';
16
- import { EventMappingFunction } from './types';
17
16
  import { mapAppError } from './mappers/mapAppError';
17
+ import { mapAppOpen } from './mappers/mapAppOpen';
18
+ import { EventMappingFunction } from './types';
18
19
 
19
20
  export const EVENTS_MAPPING: Record<EVENTS, EventMappingFunction> = {
21
+ [EVENTS.APP_OPEN]: mapAppOpen,
20
22
  [EVENTS.SCENE_VIEW]: mapSceneView,
21
23
  [EVENTS.PLAYER_OPEN]: mapPlayerOpen,
22
24
  [EVENTS.PLAYER_CLOSE]: mapPlayerClose,
@@ -45,7 +45,7 @@ export const TEALIUM_STATIC_CORE_PAYLOAD = {
45
45
  tealium_profile: 'main',
46
46
  tealium_environment: 'dev',
47
47
  tealium_datasource: 'abc',
48
- app_id: 'auto english : v1.0-test',
48
+ app_id: 'auto html5 : v1.0-test',
49
49
  app_type: 'html5',
50
50
  entity: 'auto',
51
51
  language: 'english',
@@ -0,0 +1,13 @@
1
+ import { AnalyticsTriggers } from '@24i/appstage-shared-analytics';
2
+ import { TeaSceneViewResult } from '../types';
3
+ import { TrackEventType } from '../constants';
4
+
5
+ export const mapAppOpen = (): Omit<TeaSceneViewResult, 'categories'> => ({
6
+ event_trigger: AnalyticsTriggers.SCENE_VIEW,
7
+ track_event_type: TrackEventType.VIEW,
8
+ page_title: 'app open',
9
+ page_name: 'app open',
10
+ content_type: 'onboarding',
11
+ section: 'onboarding',
12
+ subcontent_type: 'welcomeScreen',
13
+ });