@schibsted/pulse-sdk 8.0.0-rc.20 → 8.0.0-rc.21
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/cjs/Tracker.js +170 -334
- package/dist/cjs/builders/session-browser.js +4 -79
- package/dist/cjs/session/store.js +96 -0
- package/dist/cjs/tpaas-builders/builders/device.js +42 -70
- package/dist/cjs/tpaas-builders/builders/pageInfo.js +2 -3
- package/dist/cjs/tpaas-builders/builders/session.js +2 -114
- package/dist/cjs/tpaas-builders/builders/utm.js +2 -8
- package/dist/cjs/tpaas-builders/builders.js +135 -148
- package/dist/cjs/tpaas-context/adapters.js +85 -0
- package/dist/cjs/tpaas-context/browser.js +51 -0
- package/dist/cjs/tpaas-context/index.js +6 -0
- package/dist/cjs/tpaas-context/prepare.js +177 -0
- package/dist/cjs/tpaas-context/session.js +23 -0
- package/dist/cjs/tpaas-schemas/constants.js +68 -75
- package/dist/cjs/tracker-proxy/consts.js +1 -2
- package/dist/cjs/version.js +1 -1
- package/dist/ejs/Tracker.js +171 -335
- package/dist/ejs/builders/session-browser.js +4 -77
- package/dist/ejs/session/store.js +90 -0
- package/dist/ejs/tpaas-builders/builders/device.js +42 -70
- package/dist/ejs/tpaas-builders/builders/pageInfo.js +2 -3
- package/dist/ejs/tpaas-builders/builders/session.js +1 -111
- package/dist/ejs/tpaas-builders/builders/utm.js +2 -8
- package/dist/ejs/tpaas-builders/builders.js +135 -147
- package/dist/ejs/tpaas-context/adapters.js +80 -0
- package/dist/ejs/tpaas-context/browser.js +47 -0
- package/dist/ejs/tpaas-context/index.js +1 -0
- package/dist/ejs/tpaas-context/prepare.js +137 -0
- package/dist/ejs/tpaas-context/session.js +19 -0
- package/dist/ejs/tpaas-schemas/constants.js +66 -73
- package/dist/ejs/tracker-proxy/consts.js +1 -2
- package/dist/ejs/version.js +1 -1
- package/dist/types/Tracker.d.ts +27 -23
- package/dist/types/builders/session-browser.d.ts +0 -13
- package/dist/types/session/store.d.ts +34 -0
- package/dist/types/tpaas-builders/builders/consents.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/device.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/experiments.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/pageInfo.d.ts +2 -1
- package/dist/types/tpaas-builders/builders/pageviewId.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/provider.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/session.d.ts +1 -12
- package/dist/types/tpaas-builders/builders/trackerBuilder.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/user.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/utm.d.ts +2 -1
- package/dist/types/tpaas-builders/builders.d.ts +70 -70
- package/dist/types/tpaas-builders/index.d.ts +0 -1
- package/dist/types/tpaas-context/adapters.d.ts +26 -0
- package/dist/types/tpaas-context/browser.d.ts +8 -0
- package/dist/types/tpaas-context/index.d.ts +2 -0
- package/dist/types/tpaas-context/prepare.d.ts +38 -0
- package/dist/types/tpaas-context/session.d.ts +10 -0
- package/dist/types/tpaas-context/types.d.ts +66 -0
- package/dist/types/tpaas-schemas/constants.d.ts +66 -73
- package/dist/types/tpaas-schemas/types/ITpaasEvent.d.ts +2 -4
- package/dist/types/tpaas-schemas/types/schemas/{IAnonymousViewUIElement.d.ts → IAnonymousImpressionUIElement.d.ts} +2 -2
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAudio.d.ts +6 -2
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTeaser.d.ts +2 -2
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTvModule.d.ts +4 -1
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTvSearch.d.ts +4 -4
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideo.d.ts +6 -2
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideoAd.d.ts +10 -8
- package/dist/types/tpaas-schemas/types/schemas/IImpressionTeaser.d.ts +2 -2
- package/dist/types/tpaas-schemas/types/schemas/ILeaveWeather.d.ts +2 -0
- package/dist/types/tpaas-schemas/types/schemas/index.d.ts +1 -2
- package/dist/types/tpaas-schemas/types.d.ts +2 -2
- package/dist/types/tracker-proxy/consts.d.ts +1 -1
- package/dist/types/types.d.ts +2 -4
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/tpaas-builders/types.d.ts +0 -36
- package/dist/types/tpaas-schemas/types/schemas/IRequestAd.d.ts +0 -95
- /package/dist/cjs/{tpaas-builders → tpaas-context}/types.js +0 -0
- /package/dist/ejs/{tpaas-builders → tpaas-context}/types.js +0 -0
package/dist/types/Tracker.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import logger from 'loglevel';
|
|
|
2
2
|
import type { ActorInput, Consents, ConsentsInput, DeviceInput, LocationInput, ObjectInput, OriginInput, ProviderInput, TrackerInput } from './builders';
|
|
3
3
|
import { engagementEvent, identityEvent, routableEvent, trackerEvent } from './builders/events';
|
|
4
4
|
import { anonymousEngagementEvent, anonymousTrackerEvent } from './builders/events-anonymous-node';
|
|
5
|
-
import {
|
|
5
|
+
import type { AdvertisingIdentifiers, AdvertisingVendor } from './cis-sync';
|
|
6
6
|
import type { Deferred, ResolvedInput } from './defer';
|
|
7
7
|
import { type Listener } from './EventBus/EventBus';
|
|
8
8
|
import type { LeaveEvent, LeaveEventBuilder, LeaveEventOptions } from './leaveTracking/types';
|
|
9
|
-
import { type
|
|
9
|
+
import { type IAnonymousImpressionUIElement, type ICompletedHealthAction, type IContent, type IEngagementAd, type IEngagementAffiliate, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementSchoolUIElement, type IEngagementSportsUIElement, type IEngagementTeaser, type IEngagementTvModule, type IEngagementTvSearch, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IHeartbeatCommercialArticle, type IImpressionAd, type IImpressionAdSlot, type IImpressionAffiliate, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionSchoolUIElement, type IImpressionSportsUIElement, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSchoolPage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type ILoadAd, type InputParams, type IPageRef, type IProvider, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedPage, type IViewLockedVideoPage, type IViewPage, type IViewSchoolPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from './tpaas-schemas';
|
|
10
10
|
import type { AnonymousEventInputTypesByTrackingMethod, EventInput, EventInputTypesByTrackingMethod, TrackViewEventOptions } from './types';
|
|
11
11
|
import { type ObserverOptions } from './visibility-observer';
|
|
12
12
|
import type { ClickUIElementInputProperties } from './wrapper/engagement/ui-element/types';
|
|
13
|
-
import { type BaseEventExperiment } from './wrapper/types';
|
|
13
|
+
import { type BaseEventExperiment, type Promisable } from './wrapper/types';
|
|
14
14
|
import type { ViewArticleInputProperties } from './wrapper/view/article/types';
|
|
15
15
|
import type { ViewFrontpageInputProperties } from './wrapper/view/frontpage/types';
|
|
16
16
|
import type { ViewListingInputProperties } from './wrapper/view/listing/types';
|
|
@@ -61,6 +61,23 @@ interface FallbackSDKConfig {
|
|
|
61
61
|
fallbackCollectorBaseUrl: string;
|
|
62
62
|
schemaLocation: string;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
export type CurrentPageContext = {
|
|
68
|
+
/** Read and updated by both legacy and TPaaS tracking. */
|
|
69
|
+
info: Promisable<{
|
|
70
|
+
id: string;
|
|
71
|
+
type: string;
|
|
72
|
+
url?: string;
|
|
73
|
+
}>;
|
|
74
|
+
/** Updated by both legacy and TPaaS Views, and consumed by TPaaS events. */
|
|
75
|
+
referrer: Promisable<IPageRef>;
|
|
76
|
+
/** TPaaS-only metadata; legacy events neither read nor update it. */
|
|
77
|
+
content?: IContent;
|
|
78
|
+
/** TPaaS-only metadata; legacy events neither read nor update it. */
|
|
79
|
+
sports?: Pick<IViewSportsPage['object'], 'sportName' | 'sportSubview' | 'sportView' | 'sports'>;
|
|
80
|
+
};
|
|
64
81
|
/**
|
|
65
82
|
* Possible deployment stages targeted by the SDK api and/or the event routing
|
|
66
83
|
*/
|
|
@@ -316,7 +333,11 @@ export default class Tracker {
|
|
|
316
333
|
* which properties are shared and which are exclusively TPaaS metadata.
|
|
317
334
|
*/
|
|
318
335
|
private currentPageContext;
|
|
319
|
-
|
|
336
|
+
/**
|
|
337
|
+
* What the TPaaS context module reads to resolve the context of an event.
|
|
338
|
+
* Built on every call, so it always reflects the current state.
|
|
339
|
+
*/
|
|
340
|
+
private get tpaasContextSource();
|
|
320
341
|
private getCurrentLegacyPage;
|
|
321
342
|
private setCurrentTpaasPageData;
|
|
322
343
|
/**
|
|
@@ -412,18 +433,6 @@ export default class Tracker {
|
|
|
412
433
|
* @category Tracking Anonymous
|
|
413
434
|
*/
|
|
414
435
|
trackAnonymous<T extends AnonymousEventType>(eventType: T, input: AnonymousEventInputTypesByTrackingMethod[T], options?: TrackOptions): Promise<any>;
|
|
415
|
-
private adaptExperiments;
|
|
416
|
-
/**
|
|
417
|
-
*
|
|
418
|
-
* @private
|
|
419
|
-
* @category TPaaS Tracking
|
|
420
|
-
*/
|
|
421
|
-
private prepareAnonymousTpaasEvent;
|
|
422
|
-
/**
|
|
423
|
-
* @private
|
|
424
|
-
* @category TPaaS Tracking
|
|
425
|
-
*/
|
|
426
|
-
private prepareTpaasEvent;
|
|
427
436
|
/**
|
|
428
437
|
* This method extends the list of base experiments that will be automatically included in every event sent by the tracker.
|
|
429
438
|
*
|
|
@@ -597,7 +606,7 @@ export default class Tracker {
|
|
|
597
606
|
* @param input
|
|
598
607
|
* @category TPaaS Tracking
|
|
599
608
|
*/
|
|
600
|
-
|
|
609
|
+
trackAnonymousImpressionUIElement(input: InputParams<IAnonymousImpressionUIElement>): Promise<unknown>;
|
|
601
610
|
trackCompletedHealthAction(input: InputParams<ICompletedHealthAction>): Promise<unknown>;
|
|
602
611
|
trackEngagementHealthUIElement(input: InputParams<IEngagementHealthUIElement>): Promise<unknown>;
|
|
603
612
|
trackViewHealthPage(input: InputParams<IViewHealthPage>, options: TrackViewEventOptions<IViewHealthPage>): Promise<unknown>;
|
|
@@ -635,11 +644,6 @@ export default class Tracker {
|
|
|
635
644
|
* @category TPaaS Tracking
|
|
636
645
|
*/
|
|
637
646
|
trackLoadAd(input: InputParams<ILoadAd>): Promise<unknown>;
|
|
638
|
-
/**
|
|
639
|
-
* @param input
|
|
640
|
-
* @category TPaaS Tracking
|
|
641
|
-
*/
|
|
642
|
-
trackRequestAd(input: InputParams<IRequestAd>): Promise<unknown>;
|
|
643
647
|
/**
|
|
644
648
|
* @param input
|
|
645
649
|
* @param options
|
|
@@ -1148,7 +1152,7 @@ export default class Tracker {
|
|
|
1148
1152
|
* If no session exists yet, returns a promise that resolves with the session ID
|
|
1149
1153
|
* when it gets created (typically when the first non-anonymous tracking event is sent).
|
|
1150
1154
|
*
|
|
1151
|
-
* Note: Anonymous events (such as those sent via {@link trackAnonymous} or {@link
|
|
1155
|
+
* Note: Anonymous events (such as those sent via {@link trackAnonymous} or {@link trackAnonymousImpressionUIElement})
|
|
1152
1156
|
* do not create sessions and will not resolve pending session ID promises. The promise will only resolve when a
|
|
1153
1157
|
* non-anonymous tracking event is sent.
|
|
1154
1158
|
*
|
|
@@ -4,18 +4,5 @@ export type Session = {
|
|
|
4
4
|
startTime: string;
|
|
5
5
|
xDomainId?: string;
|
|
6
6
|
};
|
|
7
|
-
type StoredSession = {
|
|
8
|
-
id: string;
|
|
9
|
-
startTime: Date;
|
|
10
|
-
lastEventTime: Date;
|
|
11
|
-
};
|
|
12
|
-
type StoredSessionSerialized = [
|
|
13
|
-
id: string,
|
|
14
|
-
startTime: number,
|
|
15
|
-
lastEventTime: number
|
|
16
|
-
];
|
|
17
|
-
export declare const readAndParse: (storageKey: string) => StoredSessionSerialized | undefined;
|
|
18
|
-
export declare const readSession: () => StoredSession | undefined;
|
|
19
7
|
export declare const defaultValue: () => undefined;
|
|
20
8
|
export default function session(_input?: TrackerEventInput, eventCreationDate?: Date): Session;
|
|
21
|
-
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session as stored in the `_pulsesession` cookie, shared by legacy and TPaaS events.
|
|
3
|
+
* @private
|
|
4
|
+
*/
|
|
5
|
+
export type StoredSession = {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
startTime: Date;
|
|
8
|
+
lastEventTime: Date;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
export type TouchedSession = StoredSession & {
|
|
14
|
+
isFirstEvent: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export declare const generateSessionSDRN: (sessionId: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Reads the stored session. Any invalid or unreadable data is ignored.
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export declare const readSession: () => StoredSession | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Registers an event created at `createdAt` in the stored session: extends the current session,
|
|
27
|
+
* or starts a new one when it expired, and stores the result.
|
|
28
|
+
*
|
|
29
|
+
* Call it synchronously, together with capturing `createdAt`, before any asynchronous work,
|
|
30
|
+
* so sessions are updated in the order events are tracked.
|
|
31
|
+
*
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
export declare const touchSession: (createdAt: Date) => TouchedSession;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { IConsents } from '../../tpaas-schemas';
|
|
2
|
-
|
|
3
|
-
export declare function builder(consents: TpaasEventBuilderDependencies['consents']): {
|
|
3
|
+
export declare function builder(consents: TpaasEventContext['consents']): {
|
|
4
4
|
consents: IConsents;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { IDevice } from '../../tpaas-schemas';
|
|
2
|
-
|
|
3
|
-
export declare const builder: (environmentId: TpaasEventBuilderDependencies['environmentId'], jwe: TpaasEventBuilderDependencies['jwe']) => {
|
|
3
|
+
export declare const builder: (environmentId: TpaasEventContext['environmentId'], jwe: TpaasEventContext['jwe'], browser: TpaasEventContext['browser']) => {
|
|
4
4
|
device: IDevice;
|
|
5
5
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { IExperiments, InputParams, ITpaasEvent } from '../../tpaas-schemas';
|
|
2
|
-
import type { TpaasEventBuilderDependencies } from '../types';
|
|
3
3
|
type TpaasSchemasWithExperiments = Extract<ITpaasEvent, {
|
|
4
4
|
experiments?: IExperiments;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const builder: (baseExperiments?:
|
|
6
|
+
export declare const builder: (baseExperiments?: TpaasEventContext['experiments'], eventExperiments?: InputParams<TpaasSchemasWithExperiments>['experiments']) => {
|
|
7
7
|
experiments?: IExperiments;
|
|
8
8
|
};
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { IPageRef } from '../../tpaas-schemas';
|
|
2
|
-
export declare const builder: (currentPage
|
|
3
|
+
export declare const builder: (currentPage: IPageRef | undefined, url: TpaasEventContext['browser']['url']) => {
|
|
3
4
|
page: {
|
|
4
5
|
info: IPageRef;
|
|
5
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const builder: (pageviewId:
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
2
|
+
export declare const builder: (pageviewId: TpaasEventContext['pageviewId']) => {
|
|
3
3
|
page: {
|
|
4
4
|
pageviewId: string;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { IProvider } from '../../tpaas-schemas';
|
|
2
|
-
|
|
3
|
-
export declare function builder(providerId: TpaasEventBuilderDependencies['providerId'], providerStage: TpaasEventBuilderDependencies['providerStage'], providerProduct: TpaasEventBuilderDependencies['providerProduct'], providerVersion: TpaasEventBuilderDependencies['providerVersion'], component?: TpaasEventBuilderDependencies['component'], componentVersion?: TpaasEventBuilderDependencies['componentVersion'], providerName?: TpaasEventBuilderDependencies['providerName'], providerGroup?: TpaasEventBuilderDependencies['providerGroup']): {
|
|
3
|
+
export declare function builder(providerId: TpaasEventContext['providerId'], providerStage: TpaasEventContext['providerStage'], providerProduct: TpaasEventContext['providerProduct'], providerVersion: TpaasEventContext['providerVersion'], component?: TpaasEventContext['component'], componentVersion?: TpaasEventContext['componentVersion'], providerName?: TpaasEventContext['providerName'], providerGroup?: TpaasEventContext['providerGroup']): {
|
|
4
4
|
provider: Pick<IProvider, 'component' | 'componentVersion' | 'name' | 'group'> & Required<Pick<IProvider, 'product' | 'providerId' | 'providerSdrn' | 'stage' | 'version'>>;
|
|
5
5
|
};
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import type { ISession } from '../../tpaas-schemas';
|
|
2
|
-
|
|
3
|
-
lastEventTime: Date;
|
|
4
|
-
};
|
|
5
|
-
type StoredSessionSerialized = [
|
|
6
|
-
sessionId: string,
|
|
7
|
-
startTime: number,
|
|
8
|
-
lastEventTime: number
|
|
9
|
-
];
|
|
10
|
-
export declare const builder: (createdAt: Date) => {
|
|
2
|
+
export declare const builder: (session: ISession) => {
|
|
11
3
|
session: ISession;
|
|
12
4
|
};
|
|
13
|
-
export declare const readAndParse: (storageKey: string) => StoredSessionSerialized | undefined;
|
|
14
|
-
export declare const readSession: () => StoredSession | undefined;
|
|
15
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { ITracker } from '../../tpaas-schemas';
|
|
2
|
-
|
|
3
|
-
export declare const builder: ({ isHybrid, routingStage, version, }: Pick<TpaasEventBuilderDependencies, 'isHybrid' | 'routingStage' | 'version'>) => {
|
|
3
|
+
export declare const builder: ({ isHybrid, routingStage, version, }: Pick<TpaasEventContext, 'isHybrid' | 'routingStage' | 'version'>) => {
|
|
4
4
|
tracker: ITracker;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { IUser } from '../../tpaas-schemas';
|
|
2
|
-
|
|
3
|
-
export declare const builder: (user: TpaasEventBuilderDependencies['user']) => {
|
|
3
|
+
export declare const builder: (user: TpaasEventContext['user']) => {
|
|
4
4
|
user?: IUser;
|
|
5
5
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
1
2
|
import type { IUtmTags } from '../../tpaas-schemas';
|
|
2
|
-
export declare const builder: () => {
|
|
3
|
+
export declare const builder: (search: TpaasEventContext['browser']['search']) => {
|
|
3
4
|
page: {
|
|
4
5
|
utm?: IUtmTags;
|
|
5
6
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
1
|
+
import type { TpaasAnonymousEventContext, TpaasEventContext } from '../tpaas-context/types';
|
|
2
|
+
import { type IAnonymousImpressionUIElement, type ICompletedHealthAction, type IEngagementAd, type IEngagementAffiliate, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementSchoolUIElement, type IEngagementSportsUIElement, type IEngagementTeaser, type IEngagementTvModule, type IEngagementTvSearch, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IExperiments, type IHeartbeatCommercialArticle, type IImpressionAd, type IImpressionAdSlot, type IImpressionAffiliate, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionSchoolUIElement, type IImpressionSportsUIElement, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSchoolPage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type ILoadAd, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedPage, type IViewLockedVideoPage, type IViewPage, type IViewSchoolPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from '../tpaas-schemas';
|
|
3
3
|
/**
|
|
4
4
|
* Common builders output to be merged into all events
|
|
5
|
-
* @param
|
|
6
|
-
* @param dependencies {TpaasEventBuilderDependencies}
|
|
5
|
+
* @param context {TpaasEventContext} the event context, including the tracking input
|
|
7
6
|
* @private
|
|
8
7
|
*/
|
|
9
|
-
|
|
8
|
+
type EventContextWithExperiments = TpaasEventContext<Extract<ITpaasEvent, {
|
|
10
9
|
experiments?: IExperiments;
|
|
11
|
-
}
|
|
10
|
+
}>>;
|
|
11
|
+
export declare const getCommonBuildersOutput: (context: EventContextWithExperiments) => {
|
|
12
12
|
catalogVersion: string;
|
|
13
13
|
consents: {
|
|
14
14
|
advertising: "Accepted" | "Rejected" | "Unknown";
|
|
@@ -75,67 +75,67 @@ export declare const getCommonBuildersOutput: (createdAt: Date, dependencies: Tp
|
|
|
75
75
|
};
|
|
76
76
|
user: import("..").IUser | undefined;
|
|
77
77
|
};
|
|
78
|
-
export declare function
|
|
79
|
-
export declare function buildViewArticleEvent(
|
|
80
|
-
export declare function buildViewAudioPageEvent(
|
|
81
|
-
export declare function buildViewErrorEvent(
|
|
82
|
-
export declare function buildViewFrontpageEvent(
|
|
83
|
-
export declare function buildViewLandingpageEvent(
|
|
84
|
-
export declare function buildViewListingEvent(
|
|
85
|
-
export declare function buildViewLockedArticleEvent(
|
|
86
|
-
export declare function buildViewLockedAudioPageEvent(
|
|
87
|
-
export declare function buildViewLockedPageEvent(
|
|
88
|
-
export declare function buildViewLockedVideoPageEvent(
|
|
89
|
-
export declare function buildLeaveLockedVideoPageEvent(
|
|
90
|
-
export declare function buildViewPageEvent(
|
|
91
|
-
export declare function buildViewSportsPageEvent(
|
|
92
|
-
export declare function buildViewSchoolPageEvent(
|
|
93
|
-
export declare function buildViewTitleEvent(
|
|
94
|
-
export declare function buildViewVideoPageEvent(
|
|
95
|
-
export declare function buildViewWeatherEvent(
|
|
96
|
-
export declare function buildLeaveArticleEvent(
|
|
97
|
-
export declare function buildLeaveAudioPageEvent(
|
|
98
|
-
export declare function buildLeaveErrorEvent(
|
|
99
|
-
export declare function buildLeaveFrontpageEvent(
|
|
100
|
-
export declare function buildLeaveLandingpageEvent(
|
|
101
|
-
export declare function buildLeaveListingEvent(
|
|
102
|
-
export declare function buildLeaveLockedArticleEvent(
|
|
103
|
-
export declare function buildLeaveLockedAudioPageEvent(
|
|
104
|
-
export declare function buildLeaveLockedPageEvent(
|
|
105
|
-
export declare function buildLeavePageEvent(
|
|
106
|
-
export declare function buildLeaveSportsPageEvent(
|
|
107
|
-
export declare function buildLeaveSchoolPageEvent(
|
|
108
|
-
export declare function buildLeaveVideoPageEvent(
|
|
109
|
-
export declare function buildLeaveWeatherEvent(
|
|
110
|
-
export declare function buildEngagementAdEvent(
|
|
111
|
-
export declare function buildEngagementAffiliateEvent(
|
|
112
|
-
export declare function buildEngagementAudioEvent(
|
|
113
|
-
export declare function buildEngagementFormEvent(
|
|
114
|
-
export declare function buildEngagementOfferEvent(
|
|
115
|
-
export declare function buildEngagementSportsUIElementEvent(
|
|
116
|
-
export declare function buildEngagementSchoolUIElementEvent(
|
|
117
|
-
export declare function buildEngagementTeaserEvent(
|
|
118
|
-
export declare function buildEngagementTvModuleEvent(
|
|
119
|
-
export declare function buildEngagementTvSearchEvent(
|
|
120
|
-
export declare function buildEngagementUIElementEvent(
|
|
121
|
-
export declare function buildEngagementVideoEvent(
|
|
122
|
-
export declare function buildEngagementVideoAdEvent(
|
|
123
|
-
export declare function buildEngagementWidgetEvent(
|
|
124
|
-
export declare function buildHeartbeatCommercialArticleEvent(
|
|
125
|
-
export declare function buildCompletedHealthActionEvent(
|
|
126
|
-
export declare function buildEngagementHealthUIElementEvent(
|
|
127
|
-
export declare function buildViewHealthPageEvent(
|
|
128
|
-
export declare function buildImpressionHealthUIElementEvent(
|
|
129
|
-
export declare function buildImpressionAdEvent(
|
|
130
|
-
export declare function buildImpressionAdSlotEvent(
|
|
131
|
-
export declare function buildImpressionAffiliateEvent(
|
|
132
|
-
export declare function buildImpressionFormEvent(
|
|
133
|
-
export declare function buildImpressionOfferEvent(
|
|
134
|
-
export declare function buildImpressionPlayerEvent(
|
|
135
|
-
export declare function buildImpressionSportsUIElementEvent(
|
|
136
|
-
export declare function buildImpressionSchoolUIElementEvent(
|
|
137
|
-
export declare function buildImpressionTeaserEvent(
|
|
138
|
-
export declare function buildImpressionUIElementEvent(
|
|
139
|
-
export declare function buildImpressionWidgetEvent(
|
|
140
|
-
export declare function buildLoadAdEvent(
|
|
141
|
-
export
|
|
78
|
+
export declare function buildAnonymousImpressionUIElementEvent(context: TpaasAnonymousEventContext<IAnonymousImpressionUIElement>): IAnonymousImpressionUIElement;
|
|
79
|
+
export declare function buildViewArticleEvent(context: TpaasEventContext<IViewArticle>): IViewArticle;
|
|
80
|
+
export declare function buildViewAudioPageEvent(context: TpaasEventContext<IViewAudioPage>): IViewAudioPage;
|
|
81
|
+
export declare function buildViewErrorEvent(context: TpaasEventContext<IViewError>): IViewError;
|
|
82
|
+
export declare function buildViewFrontpageEvent(context: TpaasEventContext<IViewFrontpage>): IViewFrontpage;
|
|
83
|
+
export declare function buildViewLandingpageEvent(context: TpaasEventContext<IViewLandingpage>): IViewLandingpage;
|
|
84
|
+
export declare function buildViewListingEvent(context: TpaasEventContext<IViewListing>): IViewListing;
|
|
85
|
+
export declare function buildViewLockedArticleEvent(context: TpaasEventContext<IViewLockedArticle>): IViewLockedArticle;
|
|
86
|
+
export declare function buildViewLockedAudioPageEvent(context: TpaasEventContext<IViewLockedAudioPage>): IViewLockedAudioPage;
|
|
87
|
+
export declare function buildViewLockedPageEvent(context: TpaasEventContext<IViewLockedPage>): IViewLockedPage;
|
|
88
|
+
export declare function buildViewLockedVideoPageEvent(context: TpaasEventContext<IViewLockedVideoPage>): IViewLockedVideoPage;
|
|
89
|
+
export declare function buildLeaveLockedVideoPageEvent(context: TpaasEventContext<ILeaveLockedVideoPage>): ILeaveLockedVideoPage;
|
|
90
|
+
export declare function buildViewPageEvent(context: TpaasEventContext<IViewPage>): IViewPage;
|
|
91
|
+
export declare function buildViewSportsPageEvent(context: TpaasEventContext<IViewSportsPage>): IViewSportsPage;
|
|
92
|
+
export declare function buildViewSchoolPageEvent(context: TpaasEventContext<IViewSchoolPage>): IViewSchoolPage;
|
|
93
|
+
export declare function buildViewTitleEvent(context: TpaasEventContext<IViewTitle>): IViewTitle;
|
|
94
|
+
export declare function buildViewVideoPageEvent(context: TpaasEventContext<IViewVideoPage>): IViewVideoPage;
|
|
95
|
+
export declare function buildViewWeatherEvent(context: TpaasEventContext<IViewWeather>): IViewWeather;
|
|
96
|
+
export declare function buildLeaveArticleEvent(context: TpaasEventContext<ILeaveArticle>): ILeaveArticle;
|
|
97
|
+
export declare function buildLeaveAudioPageEvent(context: TpaasEventContext<ILeaveAudioPage>): ILeaveAudioPage;
|
|
98
|
+
export declare function buildLeaveErrorEvent(context: TpaasEventContext<ILeaveError>): ILeaveError;
|
|
99
|
+
export declare function buildLeaveFrontpageEvent(context: TpaasEventContext<ILeaveFrontpage>): ILeaveFrontpage;
|
|
100
|
+
export declare function buildLeaveLandingpageEvent(context: TpaasEventContext<ILeaveLandingpage>): ILeaveLandingpage;
|
|
101
|
+
export declare function buildLeaveListingEvent(context: TpaasEventContext<ILeaveListing>): ILeaveListing;
|
|
102
|
+
export declare function buildLeaveLockedArticleEvent(context: TpaasEventContext<ILeaveLockedArticle>): ILeaveLockedArticle;
|
|
103
|
+
export declare function buildLeaveLockedAudioPageEvent(context: TpaasEventContext<ILeaveLockedAudioPage>): ILeaveLockedAudioPage;
|
|
104
|
+
export declare function buildLeaveLockedPageEvent(context: TpaasEventContext<ILeaveLockedPage>): ILeaveLockedPage;
|
|
105
|
+
export declare function buildLeavePageEvent(context: TpaasEventContext<ILeavePage>): ILeavePage;
|
|
106
|
+
export declare function buildLeaveSportsPageEvent(context: TpaasEventContext<ILeaveSportsPage>): ILeaveSportsPage;
|
|
107
|
+
export declare function buildLeaveSchoolPageEvent(context: TpaasEventContext<ILeaveSchoolPage>): ILeaveSchoolPage;
|
|
108
|
+
export declare function buildLeaveVideoPageEvent(context: TpaasEventContext<ILeaveVideoPage>): ILeaveVideoPage;
|
|
109
|
+
export declare function buildLeaveWeatherEvent(context: TpaasEventContext<ILeaveWeather>): ILeaveWeather;
|
|
110
|
+
export declare function buildEngagementAdEvent(context: TpaasEventContext<IEngagementAd>): IEngagementAd;
|
|
111
|
+
export declare function buildEngagementAffiliateEvent(context: TpaasEventContext<IEngagementAffiliate>): IEngagementAffiliate;
|
|
112
|
+
export declare function buildEngagementAudioEvent(context: TpaasEventContext<IEngagementAudio>): IEngagementAudio;
|
|
113
|
+
export declare function buildEngagementFormEvent(context: TpaasEventContext<IEngagementForm>): IEngagementForm;
|
|
114
|
+
export declare function buildEngagementOfferEvent(context: TpaasEventContext<IEngagementOffer>): IEngagementOffer;
|
|
115
|
+
export declare function buildEngagementSportsUIElementEvent(context: TpaasEventContext<IEngagementSportsUIElement>): IEngagementSportsUIElement;
|
|
116
|
+
export declare function buildEngagementSchoolUIElementEvent(context: TpaasEventContext<IEngagementSchoolUIElement>): IEngagementSchoolUIElement;
|
|
117
|
+
export declare function buildEngagementTeaserEvent(context: TpaasEventContext<IEngagementTeaser>): IEngagementTeaser;
|
|
118
|
+
export declare function buildEngagementTvModuleEvent(context: TpaasEventContext<IEngagementTvModule>): IEngagementTvModule;
|
|
119
|
+
export declare function buildEngagementTvSearchEvent(context: TpaasEventContext<IEngagementTvSearch>): IEngagementTvSearch;
|
|
120
|
+
export declare function buildEngagementUIElementEvent(context: TpaasEventContext<IEngagementUIElement>): IEngagementUIElement;
|
|
121
|
+
export declare function buildEngagementVideoEvent(context: TpaasEventContext<IEngagementVideo>): IEngagementVideo;
|
|
122
|
+
export declare function buildEngagementVideoAdEvent(context: TpaasEventContext<IEngagementVideoAd>): IEngagementVideoAd;
|
|
123
|
+
export declare function buildEngagementWidgetEvent(context: TpaasEventContext<IEngagementWidget>): IEngagementWidget;
|
|
124
|
+
export declare function buildHeartbeatCommercialArticleEvent(context: TpaasEventContext<IHeartbeatCommercialArticle>): IHeartbeatCommercialArticle;
|
|
125
|
+
export declare function buildCompletedHealthActionEvent(context: TpaasEventContext<ICompletedHealthAction>): ICompletedHealthAction;
|
|
126
|
+
export declare function buildEngagementHealthUIElementEvent(context: TpaasEventContext<IEngagementHealthUIElement>): IEngagementHealthUIElement;
|
|
127
|
+
export declare function buildViewHealthPageEvent(context: TpaasEventContext<IViewHealthPage>): IViewHealthPage;
|
|
128
|
+
export declare function buildImpressionHealthUIElementEvent(context: TpaasEventContext<IImpressionHealthUIElement>): IImpressionHealthUIElement;
|
|
129
|
+
export declare function buildImpressionAdEvent(context: TpaasEventContext<IImpressionAd>): IImpressionAd;
|
|
130
|
+
export declare function buildImpressionAdSlotEvent(context: TpaasEventContext<IImpressionAdSlot>): IImpressionAdSlot;
|
|
131
|
+
export declare function buildImpressionAffiliateEvent(context: TpaasEventContext<IImpressionAffiliate>): IImpressionAffiliate;
|
|
132
|
+
export declare function buildImpressionFormEvent(context: TpaasEventContext<IImpressionForm>): IImpressionForm;
|
|
133
|
+
export declare function buildImpressionOfferEvent(context: TpaasEventContext<IImpressionOffer>): IImpressionOffer;
|
|
134
|
+
export declare function buildImpressionPlayerEvent(context: TpaasEventContext<IImpressionPlayer>): IImpressionPlayer;
|
|
135
|
+
export declare function buildImpressionSportsUIElementEvent(context: TpaasEventContext<IImpressionSportsUIElement>): IImpressionSportsUIElement;
|
|
136
|
+
export declare function buildImpressionSchoolUIElementEvent(context: TpaasEventContext<IImpressionSchoolUIElement>): IImpressionSchoolUIElement;
|
|
137
|
+
export declare function buildImpressionTeaserEvent(context: TpaasEventContext<IImpressionTeaser>): IImpressionTeaser;
|
|
138
|
+
export declare function buildImpressionUIElementEvent(context: TpaasEventContext<IImpressionUIElement>): IImpressionUIElement;
|
|
139
|
+
export declare function buildImpressionWidgetEvent(context: TpaasEventContext<IImpressionWidget>): IImpressionWidget;
|
|
140
|
+
export declare function buildLoadAdEvent(context: TpaasEventContext<ILoadAd>): ILoadAd;
|
|
141
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ActorInput, Consents } from '../builders';
|
|
2
|
+
import type { IExperiments } from '../tpaas-schemas';
|
|
3
|
+
import type { BaseEventExperiment } from '../wrapper/types';
|
|
4
|
+
import type { TpaasEventContext, UserParams } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Adapts the legacy actor input to the TPaaS user format.
|
|
7
|
+
*
|
|
8
|
+
* @privateRemarks
|
|
9
|
+
* This is a temporary solution to adapt the actor to the new format.
|
|
10
|
+
* It should be removed once we have new methods in place to get the actor.
|
|
11
|
+
*
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
export declare function adaptActorToNewFormat(actor?: ActorInput): UserParams | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Adapts the legacy consents to the TPaaS consents format.
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
export declare function adaptConsentsToNewFormat(consents?: Consents): TpaasEventContext['consents'];
|
|
21
|
+
/**
|
|
22
|
+
* Adapts the base experiments stored in the tracker to the TPaaS experiments format.
|
|
23
|
+
*
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
export declare function adaptExperiments(baseExperiments?: BaseEventExperiment[]): IExperiments;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TpaasBrowserContext } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Reads the browser state that can change between events, such as the URL after an SPA navigation
|
|
4
|
+
* or the viewport after a resize. Call it synchronously, when the event is tracked.
|
|
5
|
+
*
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export declare const captureBrowserContext: () => TpaasBrowserContext;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Consents } from '../builders';
|
|
2
|
+
import type { Builders, CurrentPageContext, SDKState } from '../Tracker';
|
|
3
|
+
import type { InputParams, ITpaasEvent } from '../tpaas-schemas';
|
|
4
|
+
import type { TpaasAnonymousEventContext, TpaasEventContext } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* What the Tracker provides to resolve the context of a TPaaS event.
|
|
7
|
+
*
|
|
8
|
+
* `state`, `builders` and `currentPage` are read synchronously when an event is tracked, so a later
|
|
9
|
+
* update or View event cannot change the context of an event that is still being prepared.
|
|
10
|
+
*
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
export interface TpaasContextSource {
|
|
14
|
+
state: Pick<SDKState, 'isHybrid' | 'pageViewId' | 'providerId' | 'provider' | 'component' | 'componentVersion' | 'stage' | 'product' | 'version' | 'deployStageTpaas'>;
|
|
15
|
+
builders: Builders;
|
|
16
|
+
currentPage: CurrentPageContext;
|
|
17
|
+
/** Applies the remote configuration. A failure does not prevent the event from being tracked. */
|
|
18
|
+
applyRemoteConfig(): Promise<void>;
|
|
19
|
+
/** Applies the remote configuration and syncs with CIS. A failure does not prevent the event from being tracked. */
|
|
20
|
+
syncRemoteResources(builders: Builders): Promise<unknown>;
|
|
21
|
+
getConsents(): Promise<Consents>;
|
|
22
|
+
/** Called when the event's session has been resolved and stored. */
|
|
23
|
+
onSessionResolved(): void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Resolves the context of an anonymous TPaaS event.
|
|
27
|
+
* Callers specify the event schema because it cannot be inferred from `InputParams<I>`.
|
|
28
|
+
*
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
export declare function prepareAnonymousTpaasEventContext<I extends ITpaasEvent>(source: TpaasContextSource, input: InputParams<I>): Promise<TpaasAnonymousEventContext<I>>;
|
|
32
|
+
/**
|
|
33
|
+
* Resolves the context of a TPaaS event.
|
|
34
|
+
* Callers specify the event schema because it cannot be inferred from `InputParams<I>`.
|
|
35
|
+
*
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
export declare function prepareTpaasEventContext<I extends ITpaasEvent>(source: TpaasContextSource, input: InputParams<I>): Promise<TpaasEventContext<I>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ISession } from '../tpaas-schemas';
|
|
2
|
+
/**
|
|
3
|
+
* Registers an event created at `createdAt` in the stored session and returns it in the TPaaS format.
|
|
4
|
+
*
|
|
5
|
+
* Call it synchronously, together with capturing `createdAt`, before any asynchronous work.
|
|
6
|
+
* Sessions are then updated in the order events are tracked, which is also their creation order.
|
|
7
|
+
*
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
10
|
+
export declare const resolveSession: (createdAt: Date) => ISession;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { IConsents, IContent, IDevice, IExperiments, InputParams, IPageRef, IProvider, ISession, ITpaasEvent, ITracker, IUser, IViewSportsPage } from '../tpaas-schemas';
|
|
2
|
+
/**
|
|
3
|
+
* Browser state read when the event is tracked.
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
export interface TpaasBrowserContext {
|
|
7
|
+
url?: string;
|
|
8
|
+
search: string;
|
|
9
|
+
screenOrientationType?: OrientationType;
|
|
10
|
+
viewportWidth: number;
|
|
11
|
+
viewportHeight: number;
|
|
12
|
+
userAgent: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export type UserParams = Pick<IUser, 'hasAnySubscription' | 'region'> & {
|
|
15
|
+
id: string;
|
|
16
|
+
realm: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Everything the TPaaS event builders need besides the tracking input, resolved by `prepareTpaasEventContext`.
|
|
20
|
+
*
|
|
21
|
+
* @private
|
|
22
|
+
*
|
|
23
|
+
* @privateRemarks
|
|
24
|
+
* These can be different from one event type to another, depending on the builders used by that event type.
|
|
25
|
+
* However, for now, we use the same context for all event types. let's make it more complex only if needed.
|
|
26
|
+
*/
|
|
27
|
+
export interface TpaasEventContext<I extends ITpaasEvent = ITpaasEvent> {
|
|
28
|
+
/**
|
|
29
|
+
* The tracking input, copied when the track method is called.
|
|
30
|
+
*/
|
|
31
|
+
input: InputParams<I>;
|
|
32
|
+
/**
|
|
33
|
+
* Event creation time, captured when the track method is called, before any asynchronous work.
|
|
34
|
+
*/
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
/**
|
|
37
|
+
* Session resolved together with `createdAt`, so sessions are updated in the order events are tracked.
|
|
38
|
+
*/
|
|
39
|
+
session: ISession;
|
|
40
|
+
/**
|
|
41
|
+
* Browser state read together with `createdAt`, so it describes the moment the event was tracked.
|
|
42
|
+
*/
|
|
43
|
+
browser: TpaasBrowserContext;
|
|
44
|
+
user?: UserParams;
|
|
45
|
+
version: ITracker['version'];
|
|
46
|
+
isHybrid: ITracker['isHybrid'];
|
|
47
|
+
routingStage: ITracker['routingStage'];
|
|
48
|
+
consents?: IConsents;
|
|
49
|
+
providerId: IProvider['providerId'];
|
|
50
|
+
providerName?: IProvider['name'];
|
|
51
|
+
providerGroup?: IProvider['group'];
|
|
52
|
+
providerStage: IProvider['stage'];
|
|
53
|
+
providerProduct: NonNullable<IProvider['product']>;
|
|
54
|
+
providerVersion: NonNullable<IProvider['version']>;
|
|
55
|
+
component?: IProvider['component'];
|
|
56
|
+
componentVersion?: IProvider['componentVersion'];
|
|
57
|
+
environmentId: IDevice['environmentId'];
|
|
58
|
+
jwe: IDevice['jweIds'];
|
|
59
|
+
pageviewId: string;
|
|
60
|
+
experiments?: IExperiments;
|
|
61
|
+
currentPage?: IPageRef;
|
|
62
|
+
currentPageContent?: IContent;
|
|
63
|
+
currentPageSports?: Pick<IViewSportsPage['object'], 'sportName' | 'sportSubview' | 'sportView' | 'sports'>;
|
|
64
|
+
currentPageReferrer: IPageRef;
|
|
65
|
+
}
|
|
66
|
+
export type TpaasAnonymousEventContext<I extends ITpaasEvent> = Pick<TpaasEventContext<I>, 'input' | 'createdAt' | 'browser' | 'isHybrid' | 'version' | 'pageviewId' | 'providerId' | 'providerName' | 'providerGroup' | 'providerStage' | 'providerProduct' | 'providerVersion' | 'experiments' | 'component' | 'componentVersion' | 'currentPageReferrer' | 'routingStage'>;
|