@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/ejs/Tracker.js
CHANGED
|
@@ -3,12 +3,9 @@ import { v4 } from 'uuid';
|
|
|
3
3
|
import { getDefaultAltHandler, getDefaultNativeJwe } from './app-integration';
|
|
4
4
|
import { provider, session as sessionBuilder } from './builders';
|
|
5
5
|
import { getConsentsWaitForAnalytics, getFallbackConsents } from './builders/consent-manager';
|
|
6
|
-
import { applyAdvertisingConsent, applyAdvertisingConsentSync
|
|
6
|
+
import { applyAdvertisingConsent, applyAdvertisingConsentSync } from './builders/consents';
|
|
7
7
|
import { engagementEvent, identityEvent, routableEvent, trackerEvent } from './builders/events';
|
|
8
8
|
import { anonymousEngagementEvent, anonymousTrackerEvent } from './builders/events-anonymous-node';
|
|
9
|
-
import { generateExperimentSDRN } from './builders/experiments';
|
|
10
|
-
import { readSession } from './builders/session-browser';
|
|
11
|
-
import { parsePulseCookies } from './cis-sync';
|
|
12
9
|
import { baseConfig as defaultConfig } from './config';
|
|
13
10
|
import { CISEndpoints, collectorEndpoints, remoteConfig } from './config-browser';
|
|
14
11
|
import defer from './defer';
|
|
@@ -18,10 +15,12 @@ import { addPageLeaveTracking, leaveTrackingIsActive, removePageLeaveTracking, r
|
|
|
18
15
|
import { addTpaasLeaveTracking, getTpaasLeaveObject, leaveTpaasTrackingIsActive, resetTpaasViewedContent, shouldEnableLeaveTracking, trackTpaasActiveLeave, updateTpaasLeaveTracking, updateTpaasViewedContent, } from './leaveTrackingTpaas';
|
|
19
16
|
import send from './network';
|
|
20
17
|
import * as config from './remoteConfig';
|
|
21
|
-
import {
|
|
18
|
+
import { generateSessionSDRN, readSession } from './session/store';
|
|
19
|
+
import { buildAnonymousImpressionUIElementEvent, buildCompletedHealthActionEvent, buildEngagementAdEvent, buildEngagementAffiliateEvent, buildEngagementAudioEvent, buildEngagementFormEvent, buildEngagementHealthUIElementEvent, buildEngagementOfferEvent, buildEngagementSchoolUIElementEvent, buildEngagementSportsUIElementEvent, buildEngagementTeaserEvent, buildEngagementTvModuleEvent, buildEngagementTvSearchEvent, buildEngagementUIElementEvent, buildEngagementVideoAdEvent, buildEngagementVideoEvent, buildEngagementWidgetEvent, buildHeartbeatCommercialArticleEvent, buildImpressionAdEvent, buildImpressionAdSlotEvent, buildImpressionAffiliateEvent, buildImpressionFormEvent, buildImpressionHealthUIElementEvent, buildImpressionOfferEvent, buildImpressionPlayerEvent, buildImpressionSchoolUIElementEvent, buildImpressionSportsUIElementEvent, buildImpressionTeaserEvent, buildImpressionUIElementEvent, buildImpressionWidgetEvent, buildLeaveArticleEvent, buildLeaveAudioPageEvent, buildLeaveErrorEvent, buildLeaveFrontpageEvent, buildLeaveLandingpageEvent, buildLeaveListingEvent, buildLeaveLockedArticleEvent, buildLeaveLockedAudioPageEvent, buildLeaveLockedPageEvent, buildLeaveLockedVideoPageEvent, buildLeavePageEvent, buildLeaveSchoolPageEvent, buildLeaveSportsPageEvent, buildLeaveVideoPageEvent, buildLeaveWeatherEvent, buildLoadAdEvent, buildViewArticleEvent, buildViewAudioPageEvent, buildViewErrorEvent, buildViewFrontpageEvent, buildViewHealthPageEvent, buildViewLandingpageEvent, buildViewListingEvent, buildViewLockedArticleEvent, buildViewLockedAudioPageEvent, buildViewLockedPageEvent, buildViewLockedVideoPageEvent, buildViewPageEvent, buildViewSchoolPageEvent, buildViewSportsPageEvent, buildViewTitleEvent, buildViewVideoPageEvent, buildViewWeatherEvent, } from './tpaas-builders';
|
|
20
|
+
import { prepareAnonymousTpaasEventContext, prepareTpaasEventContext } from './tpaas-context';
|
|
22
21
|
import { LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudioPage, LeaveLockedPage, LeaveLockedVideoPage, LeavePage, LeaveSchoolPage, LeaveSportsPage, LeaveVideoPage, LeaveWeather, ViewArticle, ViewAudioPage, ViewError, ViewFrontpage, ViewHealthPage, ViewLandingpage, ViewListing, ViewLockedArticle, ViewLockedAudioPage, ViewLockedPage, ViewLockedVideoPage, ViewPage, ViewSportsPage, ViewTitle, ViewVideoPage, ViewWeather, } from './tpaas-schemas';
|
|
23
22
|
import { startProxyProviderListener } from './tracker-proxy/proxy-provider';
|
|
24
|
-
import { evaluateAndFlatten, isBrowser, isFunction, isPromise,
|
|
23
|
+
import { evaluateAndFlatten, isBrowser, isFunction, isPromise, omit, pulseMerge, throttle } from './utils';
|
|
25
24
|
import { SDK_VERSION } from './version';
|
|
26
25
|
import { VisibilityObserver } from './visibility-observer';
|
|
27
26
|
import warnOnce from './warnOnce';
|
|
@@ -72,17 +71,6 @@ const ANONYMOUS_EVENT_FORBIDDEN_FIELDS = ['session', 'actor', 'device', 'locatio
|
|
|
72
71
|
function getAnonymousEventBuilder(name) {
|
|
73
72
|
return name in anonymousEvents ? anonymousEvents[name] : anonymousEvents.trackerEvent;
|
|
74
73
|
}
|
|
75
|
-
// This looks overkill, but a mapping feels safer than doing string operations (capitalize) with javascript
|
|
76
|
-
const mapDeployStageToTpaasStage = (deployStage) => {
|
|
77
|
-
switch (deployStage) {
|
|
78
|
-
case 'dev':
|
|
79
|
-
return 'Dev';
|
|
80
|
-
case 'pre':
|
|
81
|
-
return 'Pre';
|
|
82
|
-
case 'pro':
|
|
83
|
-
return 'Pro';
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
74
|
/**
|
|
87
75
|
* Determines if the SDK is running in a Hybrid (WebView) environment.
|
|
88
76
|
*
|
|
@@ -129,9 +117,20 @@ export function unsubscribe(eventName, callback) {
|
|
|
129
117
|
* @class Tracker
|
|
130
118
|
*/
|
|
131
119
|
export default class Tracker {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
120
|
+
/**
|
|
121
|
+
* What the TPaaS context module reads to resolve the context of an event.
|
|
122
|
+
* Built on every call, so it always reflects the current state.
|
|
123
|
+
*/
|
|
124
|
+
get tpaasContextSource() {
|
|
125
|
+
return {
|
|
126
|
+
state: this.state,
|
|
127
|
+
builders: this.builders,
|
|
128
|
+
currentPage: this.currentPageContext,
|
|
129
|
+
applyRemoteConfig: () => this._applyRemoteConfigEndpoints(),
|
|
130
|
+
syncRemoteResources: (builders) => this.syncRemoteResources(undefined, builders),
|
|
131
|
+
getConsents: () => this.getConsents(),
|
|
132
|
+
onSessionResolved: () => this.resolveSessionIdPromise(),
|
|
133
|
+
};
|
|
135
134
|
}
|
|
136
135
|
async getCurrentLegacyPage() {
|
|
137
136
|
const { id, type, url } = await this.currentPageContext.info;
|
|
@@ -188,8 +187,9 @@ export default class Tracker {
|
|
|
188
187
|
...referrer,
|
|
189
188
|
url: referrer?.url ?? (isBrowser ? document.referrer || undefined : undefined),
|
|
190
189
|
},
|
|
191
|
-
content
|
|
192
|
-
|
|
190
|
+
// destructure and copy content and sports to avoid mutations from outside
|
|
191
|
+
content: content && { ...content },
|
|
192
|
+
sports: sports && { ...sports },
|
|
193
193
|
};
|
|
194
194
|
};
|
|
195
195
|
/**
|
|
@@ -452,158 +452,6 @@ export default class Tracker {
|
|
|
452
452
|
await this.sendAnonymous();
|
|
453
453
|
return queuedEvent;
|
|
454
454
|
}
|
|
455
|
-
async adaptExperiments(baseExperiments = []) {
|
|
456
|
-
return baseExperiments.map((exp) => {
|
|
457
|
-
return {
|
|
458
|
-
name: exp.name || exp.id,
|
|
459
|
-
variant: exp.variant || '',
|
|
460
|
-
// nobody should be sending experiment id with an sdrn format, but in case they do
|
|
461
|
-
// we want to be able to handle it and not generate an invalid sdrn by adding another layer to it
|
|
462
|
-
experimentSdrn: exp.id.startsWith('sdrn:') ? exp.id : generateExperimentSDRN(exp.id, exp.platform),
|
|
463
|
-
platform: exp.platform || '',
|
|
464
|
-
testId: exp.custom?.testId,
|
|
465
|
-
};
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
*
|
|
470
|
-
* @private
|
|
471
|
-
* @category TPaaS Tracking
|
|
472
|
-
*/
|
|
473
|
-
async prepareAnonymousTpaasEvent() {
|
|
474
|
-
const { isHybrid, pageViewId, providerId, component, componentVersion, stage: providerStage, product: providerProduct, version: providerVersion, deployStageTpaas, } = this.state;
|
|
475
|
-
const providerName = this.state.provider?.name;
|
|
476
|
-
const providerGroup = this.state.provider?.group;
|
|
477
|
-
const experimentsInput = this.builders.experiments;
|
|
478
|
-
const currentPageReferrerInput = this.currentPageContext.referrer;
|
|
479
|
-
try {
|
|
480
|
-
await this._applyRemoteConfigEndpoints();
|
|
481
|
-
}
|
|
482
|
-
catch (ex) {
|
|
483
|
-
logger.trace('Failed to sync remote config', ex);
|
|
484
|
-
}
|
|
485
|
-
const [experiments, currentPageReferrer] = await Promise.all([
|
|
486
|
-
this.adaptExperiments(experimentsInput),
|
|
487
|
-
currentPageReferrerInput,
|
|
488
|
-
]);
|
|
489
|
-
return {
|
|
490
|
-
version: SDK_VERSION,
|
|
491
|
-
isHybrid: !!isHybrid,
|
|
492
|
-
pageviewId: pageViewId,
|
|
493
|
-
providerId,
|
|
494
|
-
providerName,
|
|
495
|
-
providerGroup,
|
|
496
|
-
providerStage,
|
|
497
|
-
providerProduct,
|
|
498
|
-
providerVersion,
|
|
499
|
-
component,
|
|
500
|
-
componentVersion,
|
|
501
|
-
routingStage: mapDeployStageToTpaasStage(deployStageTpaas),
|
|
502
|
-
experiments,
|
|
503
|
-
currentPageReferrer,
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* @private
|
|
508
|
-
* @category TPaaS Tracking
|
|
509
|
-
*/
|
|
510
|
-
async prepareTpaasEvent() {
|
|
511
|
-
// Capture event context before any asynchronous work so a concurrent update or View
|
|
512
|
-
// event cannot change the dependencies used to finish building this event.
|
|
513
|
-
const builders = { ...this.builders };
|
|
514
|
-
const { isHybrid, providerId, component, componentVersion, stage: providerStage, product: providerProduct, version: providerVersion, pageViewId, deployStageTpaas, } = this.state;
|
|
515
|
-
const providerName = this.state.provider?.name;
|
|
516
|
-
const providerGroup = this.state.provider?.group;
|
|
517
|
-
const { info: currentPageInfoInput, content: currentPageContent, sports: currentPageSports, referrer: currentPageReferrerInput, } = this.currentPageContext;
|
|
518
|
-
try {
|
|
519
|
-
await this.syncRemoteResources(undefined, builders);
|
|
520
|
-
}
|
|
521
|
-
catch (ex) {
|
|
522
|
-
logger.trace('Failed to sync remote resources', ex);
|
|
523
|
-
// remote config and CIS failures are also ignored for the old track() method. doing the same here
|
|
524
|
-
}
|
|
525
|
-
function adaptActorToNewFormat(actor) {
|
|
526
|
-
// this is a temporary solution to adapt the actor to the new format
|
|
527
|
-
// it should be removed once we have new methods in place to get the actor
|
|
528
|
-
if (!actor) {
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
|
-
return {
|
|
532
|
-
id: actor.id?.toString() || '',
|
|
533
|
-
realm: actor.realm || '',
|
|
534
|
-
hasAnySubscription: !!actor.hasAnySubscription,
|
|
535
|
-
region: isString(actor.region) ? actor.region : undefined,
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
function adaptConsentsToNewFormat(consents) {
|
|
539
|
-
if (!consents) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
const { purposes, source } = consents;
|
|
543
|
-
const { CMP_ADVERTISING, CMP_ANALYTICS, CMP_MARKETING, CMP_PERSONALIZATION } = purposes;
|
|
544
|
-
function adaptStatusOrOptIn({ status, optIn }) {
|
|
545
|
-
// doing an unnecessary check for status here
|
|
546
|
-
// because otherwise the code after the switch will be marked as unreachable in the IDE
|
|
547
|
-
if (status) {
|
|
548
|
-
switch (status) {
|
|
549
|
-
case 'accepted':
|
|
550
|
-
return 'Accepted';
|
|
551
|
-
case 'rejected':
|
|
552
|
-
return 'Rejected';
|
|
553
|
-
case 'unknown':
|
|
554
|
-
return 'Unknown';
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
if (optIn === true) {
|
|
558
|
-
return 'Accepted';
|
|
559
|
-
}
|
|
560
|
-
if (optIn === false) {
|
|
561
|
-
return 'Rejected';
|
|
562
|
-
}
|
|
563
|
-
return 'Unknown';
|
|
564
|
-
}
|
|
565
|
-
return {
|
|
566
|
-
advertising: adaptStatusOrOptIn(CMP_ADVERTISING),
|
|
567
|
-
analytics: adaptStatusOrOptIn(CMP_ANALYTICS),
|
|
568
|
-
marketing: adaptStatusOrOptIn(CMP_MARKETING),
|
|
569
|
-
personalization: adaptStatusOrOptIn(CMP_PERSONALIZATION),
|
|
570
|
-
source: source || 'unknown',
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
// Consents are intentionally not part of the event-context snapshot. Read them after
|
|
574
|
-
// remote synchronization so a blocking tracking call can use newly resolved consents.
|
|
575
|
-
const [actor, consents, experiments, currentPage, currentPageReferrer] = await Promise.all([
|
|
576
|
-
identity.getActor(builders),
|
|
577
|
-
this.getConsents(),
|
|
578
|
-
this.adaptExperiments(builders.experiments),
|
|
579
|
-
this.getCurrentTpaasPage(currentPageInfoInput),
|
|
580
|
-
currentPageReferrerInput,
|
|
581
|
-
]);
|
|
582
|
-
const { environmentId, jwe } = parsePulseCookies();
|
|
583
|
-
return {
|
|
584
|
-
version: SDK_VERSION,
|
|
585
|
-
isHybrid: !!isHybrid,
|
|
586
|
-
user: adaptActorToNewFormat(actor),
|
|
587
|
-
consents: adaptConsentsToNewFormat(consents),
|
|
588
|
-
providerId,
|
|
589
|
-
providerName,
|
|
590
|
-
providerGroup,
|
|
591
|
-
providerStage,
|
|
592
|
-
providerProduct,
|
|
593
|
-
providerVersion,
|
|
594
|
-
component,
|
|
595
|
-
componentVersion,
|
|
596
|
-
pageviewId: pageViewId,
|
|
597
|
-
routingStage: mapDeployStageToTpaasStage(deployStageTpaas),
|
|
598
|
-
currentPage,
|
|
599
|
-
currentPageContent,
|
|
600
|
-
currentPageSports,
|
|
601
|
-
currentPageReferrer,
|
|
602
|
-
experiments,
|
|
603
|
-
environmentId,
|
|
604
|
-
jwe,
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
455
|
/**
|
|
608
456
|
* This method extends the list of base experiments that will be automatically included in every event sent by the tracker.
|
|
609
457
|
*
|
|
@@ -840,19 +688,19 @@ export default class Tracker {
|
|
|
840
688
|
* @param input
|
|
841
689
|
* @category TPaaS Tracking
|
|
842
690
|
*/
|
|
843
|
-
async
|
|
844
|
-
const
|
|
845
|
-
const event =
|
|
691
|
+
async trackAnonymousImpressionUIElement(input) {
|
|
692
|
+
const context = await prepareAnonymousTpaasEventContext(this.tpaasContextSource, input);
|
|
693
|
+
const event = buildAnonymousImpressionUIElementEvent(context);
|
|
846
694
|
return this.sendTpaasEvent(event);
|
|
847
695
|
}
|
|
848
696
|
async trackCompletedHealthAction(input) {
|
|
849
|
-
const
|
|
850
|
-
const event = buildCompletedHealthActionEvent(
|
|
697
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
698
|
+
const event = buildCompletedHealthActionEvent(context);
|
|
851
699
|
return this.sendTpaasEvent(event);
|
|
852
700
|
}
|
|
853
701
|
async trackEngagementHealthUIElement(input) {
|
|
854
|
-
const
|
|
855
|
-
const event = buildEngagementHealthUIElementEvent(
|
|
702
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
703
|
+
const event = buildEngagementHealthUIElementEvent(context);
|
|
856
704
|
return this.sendTpaasEvent(event);
|
|
857
705
|
}
|
|
858
706
|
async trackViewHealthPage(input, options) {
|
|
@@ -862,16 +710,16 @@ export default class Tracker {
|
|
|
862
710
|
type: ViewHealthPage.object.objectType,
|
|
863
711
|
referrer: input.page?.referrer,
|
|
864
712
|
});
|
|
865
|
-
const
|
|
866
|
-
const event = buildViewHealthPageEvent(
|
|
713
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
714
|
+
const event = buildViewHealthPageEvent(context);
|
|
867
715
|
const result = this.sendTpaasEvent(event);
|
|
868
716
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
869
717
|
const leavePageCallback = async (leave) => {
|
|
870
718
|
// HealthView Page is a bit special, in the sense that in doesn't have a dedicated Leave event.
|
|
871
719
|
// Instead, we need to reuse the generic Leave Page event, but adapt the input accordingly.
|
|
872
720
|
// This means omitting some fields from HealthView Page that are not part of Leave Page schema.
|
|
873
|
-
const { experiments, metrics, object, origin, userHealthData, ...restInput } = input;
|
|
874
|
-
const { category, custom, name, tags, food, physicalActivity, training, ...restObject } = input.object;
|
|
721
|
+
const { experiments, metrics, object, origin, userHealthData, ...restInput } = context.input;
|
|
722
|
+
const { category, custom, name, tags, food, physicalActivity, training, ...restObject } = context.input.object;
|
|
875
723
|
await this.trackLeavePage({
|
|
876
724
|
leave,
|
|
877
725
|
...restInput,
|
|
@@ -890,8 +738,8 @@ export default class Tracker {
|
|
|
890
738
|
return result;
|
|
891
739
|
}
|
|
892
740
|
async trackImpressionHealthUIElement(input) {
|
|
893
|
-
const
|
|
894
|
-
const event = buildImpressionHealthUIElementEvent(
|
|
741
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
742
|
+
const event = buildImpressionHealthUIElementEvent(context);
|
|
895
743
|
return this.sendTpaasEvent(event);
|
|
896
744
|
}
|
|
897
745
|
/**
|
|
@@ -906,14 +754,14 @@ export default class Tracker {
|
|
|
906
754
|
type: ViewPage.object.objectType,
|
|
907
755
|
referrer: input.page?.referrer,
|
|
908
756
|
});
|
|
909
|
-
const
|
|
910
|
-
const event = buildViewPageEvent(
|
|
757
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
758
|
+
const event = buildViewPageEvent(context);
|
|
911
759
|
const result = this.sendTpaasEvent(event);
|
|
912
760
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
913
761
|
const leavePageCallback = async (leave) => {
|
|
914
762
|
await this.trackLeavePage({
|
|
915
763
|
leave,
|
|
916
|
-
...input,
|
|
764
|
+
...context.input,
|
|
917
765
|
});
|
|
918
766
|
};
|
|
919
767
|
addTpaasLeaveTracking({
|
|
@@ -942,14 +790,14 @@ export default class Tracker {
|
|
|
942
790
|
sports: input.object.sports,
|
|
943
791
|
},
|
|
944
792
|
});
|
|
945
|
-
const
|
|
946
|
-
const event = buildViewSportsPageEvent(
|
|
793
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
794
|
+
const event = buildViewSportsPageEvent(context);
|
|
947
795
|
const result = this.sendTpaasEvent(event);
|
|
948
796
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
949
797
|
const leaveSportsPageCallback = async (leave) => {
|
|
950
798
|
await this.trackLeaveSportsPage({
|
|
951
799
|
leave,
|
|
952
|
-
...input,
|
|
800
|
+
...context.input,
|
|
953
801
|
});
|
|
954
802
|
};
|
|
955
803
|
addTpaasLeaveTracking({
|
|
@@ -973,14 +821,14 @@ export default class Tracker {
|
|
|
973
821
|
type: 'Page',
|
|
974
822
|
referrer: input.page?.referrer,
|
|
975
823
|
});
|
|
976
|
-
const
|
|
977
|
-
const event = buildViewSchoolPageEvent(
|
|
824
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
825
|
+
const event = buildViewSchoolPageEvent(context);
|
|
978
826
|
const result = this.sendTpaasEvent(event);
|
|
979
827
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
980
828
|
const leaveSchoolPageCallback = async (leave) => {
|
|
981
829
|
await this.trackLeaveSchoolPage({
|
|
982
830
|
leave,
|
|
983
|
-
...input,
|
|
831
|
+
...context.input,
|
|
984
832
|
});
|
|
985
833
|
};
|
|
986
834
|
addTpaasLeaveTracking({
|
|
@@ -1002,8 +850,8 @@ export default class Tracker {
|
|
|
1002
850
|
type: ViewTitle.object.objectType,
|
|
1003
851
|
referrer: input.page?.referrer,
|
|
1004
852
|
});
|
|
1005
|
-
const
|
|
1006
|
-
const event = buildViewTitleEvent(
|
|
853
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
854
|
+
const event = buildViewTitleEvent(context);
|
|
1007
855
|
return this.sendTpaasEvent(event);
|
|
1008
856
|
// there's no Leave Title event
|
|
1009
857
|
}
|
|
@@ -1012,8 +860,8 @@ export default class Tracker {
|
|
|
1012
860
|
* @category TPaaS Tracking
|
|
1013
861
|
*/
|
|
1014
862
|
async trackImpressionWidget(input) {
|
|
1015
|
-
const
|
|
1016
|
-
const event = buildImpressionWidgetEvent(
|
|
863
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
864
|
+
const event = buildImpressionWidgetEvent(context);
|
|
1017
865
|
return this.sendTpaasEvent(event);
|
|
1018
866
|
}
|
|
1019
867
|
/**
|
|
@@ -1021,17 +869,8 @@ export default class Tracker {
|
|
|
1021
869
|
* @category TPaaS Tracking
|
|
1022
870
|
*/
|
|
1023
871
|
async trackLoadAd(input) {
|
|
1024
|
-
const
|
|
1025
|
-
const event = buildLoadAdEvent(
|
|
1026
|
-
return this.sendTpaasEvent(event);
|
|
1027
|
-
}
|
|
1028
|
-
/**
|
|
1029
|
-
* @param input
|
|
1030
|
-
* @category TPaaS Tracking
|
|
1031
|
-
*/
|
|
1032
|
-
async trackRequestAd(input) {
|
|
1033
|
-
const dependencies = await this.prepareTpaasEvent();
|
|
1034
|
-
const event = buildRequestAdEvent(input, dependencies);
|
|
872
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
873
|
+
const event = buildLoadAdEvent(context);
|
|
1035
874
|
return this.sendTpaasEvent(event);
|
|
1036
875
|
}
|
|
1037
876
|
/**
|
|
@@ -1047,14 +886,14 @@ export default class Tracker {
|
|
|
1047
886
|
referrer: input.page?.referrer,
|
|
1048
887
|
content: input.page?.content,
|
|
1049
888
|
});
|
|
1050
|
-
const
|
|
1051
|
-
const event = buildViewArticleEvent(
|
|
889
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
890
|
+
const event = buildViewArticleEvent(context);
|
|
1052
891
|
const result = this.sendTpaasEvent(event);
|
|
1053
892
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1054
893
|
const leaveArticleCallback = async (leave) => {
|
|
1055
894
|
await this.trackLeaveArticle({
|
|
1056
895
|
leave,
|
|
1057
|
-
...input,
|
|
896
|
+
...context.input,
|
|
1058
897
|
});
|
|
1059
898
|
};
|
|
1060
899
|
addTpaasLeaveTracking({
|
|
@@ -1113,8 +952,8 @@ export default class Tracker {
|
|
|
1113
952
|
referrer: input.page?.referrer,
|
|
1114
953
|
content: input.page?.content,
|
|
1115
954
|
});
|
|
1116
|
-
const
|
|
1117
|
-
const event = buildViewAudioPageEvent(
|
|
955
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
956
|
+
const event = buildViewAudioPageEvent(context);
|
|
1118
957
|
const result = this.sendTpaasEvent(event);
|
|
1119
958
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1120
959
|
const { leaveAudioBuilder, ...restLeaveTrackingOptions } = options.leaveTracking;
|
|
@@ -1132,7 +971,7 @@ export default class Tracker {
|
|
|
1132
971
|
activityDurationMs: leave.activityDurationMs,
|
|
1133
972
|
durationMs: leave.durationMs,
|
|
1134
973
|
},
|
|
1135
|
-
...input,
|
|
974
|
+
...context.input,
|
|
1136
975
|
});
|
|
1137
976
|
};
|
|
1138
977
|
addTpaasLeaveTracking({
|
|
@@ -1155,14 +994,14 @@ export default class Tracker {
|
|
|
1155
994
|
type: ViewError.object.objectType,
|
|
1156
995
|
referrer: input.page?.referrer,
|
|
1157
996
|
});
|
|
1158
|
-
const
|
|
1159
|
-
const event = buildViewErrorEvent(
|
|
997
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
998
|
+
const event = buildViewErrorEvent(context);
|
|
1160
999
|
const result = this.sendTpaasEvent(event);
|
|
1161
1000
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1162
1001
|
const leaveErrorCallback = async (leave) => {
|
|
1163
1002
|
await this.trackLeaveError({
|
|
1164
1003
|
leave,
|
|
1165
|
-
...input,
|
|
1004
|
+
...context.input,
|
|
1166
1005
|
});
|
|
1167
1006
|
};
|
|
1168
1007
|
addTpaasLeaveTracking({
|
|
@@ -1178,8 +1017,8 @@ export default class Tracker {
|
|
|
1178
1017
|
* @category TPaaS Tracking
|
|
1179
1018
|
*/
|
|
1180
1019
|
async trackImpressionAd(input) {
|
|
1181
|
-
const
|
|
1182
|
-
const event = buildImpressionAdEvent(
|
|
1020
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1021
|
+
const event = buildImpressionAdEvent(context);
|
|
1183
1022
|
return this.sendTpaasEvent(event);
|
|
1184
1023
|
}
|
|
1185
1024
|
/**
|
|
@@ -1187,8 +1026,8 @@ export default class Tracker {
|
|
|
1187
1026
|
* @category TPaaS Tracking
|
|
1188
1027
|
*/
|
|
1189
1028
|
async trackImpressionAdSlot(input) {
|
|
1190
|
-
const
|
|
1191
|
-
const event = buildImpressionAdSlotEvent(
|
|
1029
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1030
|
+
const event = buildImpressionAdSlotEvent(context);
|
|
1192
1031
|
return this.sendTpaasEvent(event);
|
|
1193
1032
|
}
|
|
1194
1033
|
/**
|
|
@@ -1196,8 +1035,8 @@ export default class Tracker {
|
|
|
1196
1035
|
* @category TPaaS Tracking
|
|
1197
1036
|
*/
|
|
1198
1037
|
async trackImpressionAffiliate(input) {
|
|
1199
|
-
const
|
|
1200
|
-
const event = buildImpressionAffiliateEvent(
|
|
1038
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1039
|
+
const event = buildImpressionAffiliateEvent(context);
|
|
1201
1040
|
return this.sendTpaasEvent(event);
|
|
1202
1041
|
}
|
|
1203
1042
|
/**
|
|
@@ -1205,8 +1044,8 @@ export default class Tracker {
|
|
|
1205
1044
|
* @category TPaaS Tracking
|
|
1206
1045
|
*/
|
|
1207
1046
|
async trackImpressionForm(input) {
|
|
1208
|
-
const
|
|
1209
|
-
const event = buildImpressionFormEvent(
|
|
1047
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1048
|
+
const event = buildImpressionFormEvent(context);
|
|
1210
1049
|
return this.sendTpaasEvent(event);
|
|
1211
1050
|
}
|
|
1212
1051
|
/**
|
|
@@ -1214,8 +1053,8 @@ export default class Tracker {
|
|
|
1214
1053
|
* @category TPaaS Tracking
|
|
1215
1054
|
*/
|
|
1216
1055
|
async trackImpressionOffer(input) {
|
|
1217
|
-
const
|
|
1218
|
-
const event = buildImpressionOfferEvent(
|
|
1056
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1057
|
+
const event = buildImpressionOfferEvent(context);
|
|
1219
1058
|
return this.sendTpaasEvent(event);
|
|
1220
1059
|
}
|
|
1221
1060
|
/**
|
|
@@ -1223,8 +1062,8 @@ export default class Tracker {
|
|
|
1223
1062
|
* @category TPaaS Tracking
|
|
1224
1063
|
*/
|
|
1225
1064
|
async trackImpressionPlayer(input) {
|
|
1226
|
-
const
|
|
1227
|
-
const event = buildImpressionPlayerEvent(
|
|
1065
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1066
|
+
const event = buildImpressionPlayerEvent(context);
|
|
1228
1067
|
return this.sendTpaasEvent(event);
|
|
1229
1068
|
}
|
|
1230
1069
|
/**
|
|
@@ -1232,8 +1071,8 @@ export default class Tracker {
|
|
|
1232
1071
|
* @category TPaaS Tracking
|
|
1233
1072
|
*/
|
|
1234
1073
|
async trackImpressionSportsUIElement(input) {
|
|
1235
|
-
const
|
|
1236
|
-
const event = buildImpressionSportsUIElementEvent(
|
|
1074
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1075
|
+
const event = buildImpressionSportsUIElementEvent(context);
|
|
1237
1076
|
return this.sendTpaasEvent(event);
|
|
1238
1077
|
}
|
|
1239
1078
|
/**
|
|
@@ -1241,8 +1080,8 @@ export default class Tracker {
|
|
|
1241
1080
|
* @category TPaaS Tracking
|
|
1242
1081
|
*/
|
|
1243
1082
|
async trackImpressionSchoolUIElement(input) {
|
|
1244
|
-
const
|
|
1245
|
-
const event = buildImpressionSchoolUIElementEvent(
|
|
1083
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1084
|
+
const event = buildImpressionSchoolUIElementEvent(context);
|
|
1246
1085
|
return this.sendTpaasEvent(event);
|
|
1247
1086
|
}
|
|
1248
1087
|
/**
|
|
@@ -1250,8 +1089,8 @@ export default class Tracker {
|
|
|
1250
1089
|
* @category TPaaS Tracking
|
|
1251
1090
|
*/
|
|
1252
1091
|
async trackImpressionTeaser(input) {
|
|
1253
|
-
const
|
|
1254
|
-
const event = buildImpressionTeaserEvent(
|
|
1092
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1093
|
+
const event = buildImpressionTeaserEvent(context);
|
|
1255
1094
|
return this.sendTpaasEvent(event);
|
|
1256
1095
|
}
|
|
1257
1096
|
/**
|
|
@@ -1259,8 +1098,8 @@ export default class Tracker {
|
|
|
1259
1098
|
* @category TPaaS Tracking
|
|
1260
1099
|
*/
|
|
1261
1100
|
async trackImpressionUIElement(input) {
|
|
1262
|
-
const
|
|
1263
|
-
const event = buildImpressionUIElementEvent(
|
|
1101
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1102
|
+
const event = buildImpressionUIElementEvent(context);
|
|
1264
1103
|
return this.sendTpaasEvent(event);
|
|
1265
1104
|
}
|
|
1266
1105
|
/**
|
|
@@ -1275,14 +1114,14 @@ export default class Tracker {
|
|
|
1275
1114
|
type: ViewFrontpage.object.objectType,
|
|
1276
1115
|
referrer: input.page?.referrer,
|
|
1277
1116
|
});
|
|
1278
|
-
const
|
|
1279
|
-
const event = buildViewFrontpageEvent(
|
|
1117
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1118
|
+
const event = buildViewFrontpageEvent(context);
|
|
1280
1119
|
const result = this.sendTpaasEvent(event);
|
|
1281
1120
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1282
1121
|
const leaveFrontpageCallback = async (leave) => {
|
|
1283
1122
|
await this.trackLeaveFrontpage({
|
|
1284
1123
|
leave,
|
|
1285
|
-
...input,
|
|
1124
|
+
...context.input,
|
|
1286
1125
|
});
|
|
1287
1126
|
};
|
|
1288
1127
|
addTpaasLeaveTracking({
|
|
@@ -1305,14 +1144,14 @@ export default class Tracker {
|
|
|
1305
1144
|
type: ViewLandingpage.object.objectType,
|
|
1306
1145
|
referrer: input.page?.referrer,
|
|
1307
1146
|
});
|
|
1308
|
-
const
|
|
1309
|
-
const event = buildViewLandingpageEvent(
|
|
1147
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1148
|
+
const event = buildViewLandingpageEvent(context);
|
|
1310
1149
|
const result = this.sendTpaasEvent(event);
|
|
1311
1150
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1312
1151
|
const leaveLandingpageCallback = async (leave) => {
|
|
1313
1152
|
await this.trackLeaveLandingpage({
|
|
1314
1153
|
leave,
|
|
1315
|
-
...input,
|
|
1154
|
+
...context.input,
|
|
1316
1155
|
});
|
|
1317
1156
|
};
|
|
1318
1157
|
addTpaasLeaveTracking({
|
|
@@ -1335,14 +1174,14 @@ export default class Tracker {
|
|
|
1335
1174
|
type: ViewListing.object.objectType,
|
|
1336
1175
|
referrer: input.page?.referrer,
|
|
1337
1176
|
});
|
|
1338
|
-
const
|
|
1339
|
-
const event = buildViewListingEvent(
|
|
1177
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1178
|
+
const event = buildViewListingEvent(context);
|
|
1340
1179
|
const result = this.sendTpaasEvent(event);
|
|
1341
1180
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1342
1181
|
const leaveListingCallback = async (leave) => {
|
|
1343
1182
|
await this.trackLeaveListing({
|
|
1344
1183
|
leave,
|
|
1345
|
-
...input,
|
|
1184
|
+
...context.input,
|
|
1346
1185
|
});
|
|
1347
1186
|
};
|
|
1348
1187
|
addTpaasLeaveTracking({
|
|
@@ -1366,14 +1205,14 @@ export default class Tracker {
|
|
|
1366
1205
|
referrer: input.page?.referrer,
|
|
1367
1206
|
content: input.page?.content,
|
|
1368
1207
|
});
|
|
1369
|
-
const
|
|
1370
|
-
const event = buildViewLockedArticleEvent(
|
|
1208
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1209
|
+
const event = buildViewLockedArticleEvent(context);
|
|
1371
1210
|
const result = this.sendTpaasEvent(event);
|
|
1372
1211
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1373
1212
|
const leaveLockedArticleCallback = async (leave) => {
|
|
1374
1213
|
await this.trackLeaveLockedArticle({
|
|
1375
1214
|
leave,
|
|
1376
|
-
...input,
|
|
1215
|
+
...context.input,
|
|
1377
1216
|
});
|
|
1378
1217
|
};
|
|
1379
1218
|
addTpaasLeaveTracking({
|
|
@@ -1397,14 +1236,14 @@ export default class Tracker {
|
|
|
1397
1236
|
referrer: input.page?.referrer,
|
|
1398
1237
|
content: input.page?.content,
|
|
1399
1238
|
});
|
|
1400
|
-
const
|
|
1401
|
-
const event = buildViewLockedAudioPageEvent(
|
|
1239
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1240
|
+
const event = buildViewLockedAudioPageEvent(context);
|
|
1402
1241
|
const result = this.sendTpaasEvent(event);
|
|
1403
1242
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1404
1243
|
const leaveLockedAudioPageCallback = async (leave) => {
|
|
1405
1244
|
await this.trackLeaveLockedAudioPage({
|
|
1406
1245
|
leave,
|
|
1407
|
-
...input,
|
|
1246
|
+
...context.input,
|
|
1408
1247
|
});
|
|
1409
1248
|
};
|
|
1410
1249
|
addTpaasLeaveTracking({
|
|
@@ -1427,14 +1266,14 @@ export default class Tracker {
|
|
|
1427
1266
|
type: ViewLockedPage.object.objectType,
|
|
1428
1267
|
referrer: input.page?.referrer,
|
|
1429
1268
|
});
|
|
1430
|
-
const
|
|
1431
|
-
const event = buildViewLockedPageEvent(
|
|
1269
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1270
|
+
const event = buildViewLockedPageEvent(context);
|
|
1432
1271
|
const result = this.sendTpaasEvent(event);
|
|
1433
1272
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1434
1273
|
const leaveLockedPageCallback = async (leave) => {
|
|
1435
1274
|
await this.trackLeaveLockedPage({
|
|
1436
1275
|
leave,
|
|
1437
|
-
...input,
|
|
1276
|
+
...context.input,
|
|
1438
1277
|
});
|
|
1439
1278
|
};
|
|
1440
1279
|
addTpaasLeaveTracking({
|
|
@@ -1458,14 +1297,14 @@ export default class Tracker {
|
|
|
1458
1297
|
referrer: input.page?.referrer,
|
|
1459
1298
|
content: input.page?.content,
|
|
1460
1299
|
});
|
|
1461
|
-
const
|
|
1462
|
-
const event = buildViewLockedVideoPageEvent(
|
|
1300
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1301
|
+
const event = buildViewLockedVideoPageEvent(context);
|
|
1463
1302
|
const result = this.sendTpaasEvent(event);
|
|
1464
1303
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1465
1304
|
const leaveLockedVideoPageCallback = async (leave) => {
|
|
1466
1305
|
await this.trackLeaveLockedVideoPage({
|
|
1467
1306
|
leave,
|
|
1468
|
-
...input,
|
|
1307
|
+
...context.input,
|
|
1469
1308
|
});
|
|
1470
1309
|
};
|
|
1471
1310
|
addTpaasLeaveTracking({
|
|
@@ -1526,8 +1365,8 @@ export default class Tracker {
|
|
|
1526
1365
|
referrer: input.page?.referrer,
|
|
1527
1366
|
content: input.page?.content,
|
|
1528
1367
|
});
|
|
1529
|
-
const
|
|
1530
|
-
const event = buildViewVideoPageEvent(
|
|
1368
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1369
|
+
const event = buildViewVideoPageEvent(context);
|
|
1531
1370
|
const result = this.sendTpaasEvent(event);
|
|
1532
1371
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1533
1372
|
const { leaveStoriesBuilder, ...restLeaveTrackingOptions } = options.leaveTracking;
|
|
@@ -1536,7 +1375,7 @@ export default class Tracker {
|
|
|
1536
1375
|
await this.trackLeaveVideoPage({
|
|
1537
1376
|
leave,
|
|
1538
1377
|
leaveStories: leaveStoriesInput,
|
|
1539
|
-
...input,
|
|
1378
|
+
...context.input,
|
|
1540
1379
|
});
|
|
1541
1380
|
};
|
|
1542
1381
|
addTpaasLeaveTracking({
|
|
@@ -1559,14 +1398,14 @@ export default class Tracker {
|
|
|
1559
1398
|
type: ViewWeather.object.objectType,
|
|
1560
1399
|
referrer: input.page?.referrer,
|
|
1561
1400
|
});
|
|
1562
|
-
const
|
|
1563
|
-
const event = buildViewWeatherEvent(
|
|
1401
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1402
|
+
const event = buildViewWeatherEvent(context);
|
|
1564
1403
|
const result = this.sendTpaasEvent(event);
|
|
1565
1404
|
if (shouldEnableLeaveTracking(options.leaveTracking)) {
|
|
1566
1405
|
const leaveWeatherCallback = async (leave) => {
|
|
1567
1406
|
await this.trackLeaveWeather({
|
|
1568
1407
|
leave,
|
|
1569
|
-
...input,
|
|
1408
|
+
...context.input,
|
|
1570
1409
|
});
|
|
1571
1410
|
};
|
|
1572
1411
|
addTpaasLeaveTracking({
|
|
@@ -1582,8 +1421,8 @@ export default class Tracker {
|
|
|
1582
1421
|
* @category TPaaS Tracking
|
|
1583
1422
|
*/
|
|
1584
1423
|
async trackLeaveArticle(input) {
|
|
1585
|
-
const
|
|
1586
|
-
const event = buildLeaveArticleEvent(
|
|
1424
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1425
|
+
const event = buildLeaveArticleEvent(context);
|
|
1587
1426
|
return this.sendTpaasEvent(event);
|
|
1588
1427
|
}
|
|
1589
1428
|
/**
|
|
@@ -1591,8 +1430,8 @@ export default class Tracker {
|
|
|
1591
1430
|
* @category TPaaS Tracking
|
|
1592
1431
|
*/
|
|
1593
1432
|
async trackLeaveAudioPage(input) {
|
|
1594
|
-
const
|
|
1595
|
-
const event = buildLeaveAudioPageEvent(
|
|
1433
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1434
|
+
const event = buildLeaveAudioPageEvent(context);
|
|
1596
1435
|
return this.sendTpaasEvent(event);
|
|
1597
1436
|
}
|
|
1598
1437
|
/**
|
|
@@ -1600,8 +1439,8 @@ export default class Tracker {
|
|
|
1600
1439
|
* @category TPaaS Tracking
|
|
1601
1440
|
*/
|
|
1602
1441
|
async trackLeaveError(input) {
|
|
1603
|
-
const
|
|
1604
|
-
const event = buildLeaveErrorEvent(
|
|
1442
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1443
|
+
const event = buildLeaveErrorEvent(context);
|
|
1605
1444
|
return this.sendTpaasEvent(event);
|
|
1606
1445
|
}
|
|
1607
1446
|
/**
|
|
@@ -1609,8 +1448,8 @@ export default class Tracker {
|
|
|
1609
1448
|
* @category TPaaS Tracking
|
|
1610
1449
|
*/
|
|
1611
1450
|
async trackLeaveFrontpage(input) {
|
|
1612
|
-
const
|
|
1613
|
-
const event = buildLeaveFrontpageEvent(
|
|
1451
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1452
|
+
const event = buildLeaveFrontpageEvent(context);
|
|
1614
1453
|
return this.sendTpaasEvent(event);
|
|
1615
1454
|
}
|
|
1616
1455
|
/**
|
|
@@ -1618,8 +1457,8 @@ export default class Tracker {
|
|
|
1618
1457
|
* @category TPaaS Tracking
|
|
1619
1458
|
*/
|
|
1620
1459
|
async trackLeaveLandingpage(input) {
|
|
1621
|
-
const
|
|
1622
|
-
const event = buildLeaveLandingpageEvent(
|
|
1460
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1461
|
+
const event = buildLeaveLandingpageEvent(context);
|
|
1623
1462
|
return this.sendTpaasEvent(event);
|
|
1624
1463
|
}
|
|
1625
1464
|
/**
|
|
@@ -1627,8 +1466,8 @@ export default class Tracker {
|
|
|
1627
1466
|
* @category TPaaS Tracking
|
|
1628
1467
|
*/
|
|
1629
1468
|
async trackLeaveListing(input) {
|
|
1630
|
-
const
|
|
1631
|
-
const event = buildLeaveListingEvent(
|
|
1469
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1470
|
+
const event = buildLeaveListingEvent(context);
|
|
1632
1471
|
return this.sendTpaasEvent(event);
|
|
1633
1472
|
}
|
|
1634
1473
|
/**
|
|
@@ -1636,8 +1475,8 @@ export default class Tracker {
|
|
|
1636
1475
|
* @category TPaaS Tracking
|
|
1637
1476
|
*/
|
|
1638
1477
|
async trackLeaveLockedArticle(input) {
|
|
1639
|
-
const
|
|
1640
|
-
const event = buildLeaveLockedArticleEvent(
|
|
1478
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1479
|
+
const event = buildLeaveLockedArticleEvent(context);
|
|
1641
1480
|
return this.sendTpaasEvent(event);
|
|
1642
1481
|
}
|
|
1643
1482
|
/**
|
|
@@ -1645,8 +1484,8 @@ export default class Tracker {
|
|
|
1645
1484
|
* @category TPaaS Tracking
|
|
1646
1485
|
*/
|
|
1647
1486
|
async trackLeaveLockedAudioPage(input) {
|
|
1648
|
-
const
|
|
1649
|
-
const event = buildLeaveLockedAudioPageEvent(
|
|
1487
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1488
|
+
const event = buildLeaveLockedAudioPageEvent(context);
|
|
1650
1489
|
return this.sendTpaasEvent(event);
|
|
1651
1490
|
}
|
|
1652
1491
|
/**
|
|
@@ -1654,8 +1493,8 @@ export default class Tracker {
|
|
|
1654
1493
|
* @category TPaaS Tracking
|
|
1655
1494
|
*/
|
|
1656
1495
|
async trackLeaveLockedPage(input) {
|
|
1657
|
-
const
|
|
1658
|
-
const event = buildLeaveLockedPageEvent(
|
|
1496
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1497
|
+
const event = buildLeaveLockedPageEvent(context);
|
|
1659
1498
|
return this.sendTpaasEvent(event);
|
|
1660
1499
|
}
|
|
1661
1500
|
/**
|
|
@@ -1663,8 +1502,8 @@ export default class Tracker {
|
|
|
1663
1502
|
* @category TPaaS Tracking
|
|
1664
1503
|
*/
|
|
1665
1504
|
async trackLeaveLockedVideoPage(input) {
|
|
1666
|
-
const
|
|
1667
|
-
const event = buildLeaveLockedVideoPageEvent(
|
|
1505
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1506
|
+
const event = buildLeaveLockedVideoPageEvent(context);
|
|
1668
1507
|
return this.sendTpaasEvent(event);
|
|
1669
1508
|
}
|
|
1670
1509
|
/**
|
|
@@ -1672,8 +1511,8 @@ export default class Tracker {
|
|
|
1672
1511
|
* @category TPaaS Tracking
|
|
1673
1512
|
*/
|
|
1674
1513
|
async trackLeavePage(input) {
|
|
1675
|
-
const
|
|
1676
|
-
const event = buildLeavePageEvent(
|
|
1514
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1515
|
+
const event = buildLeavePageEvent(context);
|
|
1677
1516
|
return this.sendTpaasEvent(event);
|
|
1678
1517
|
}
|
|
1679
1518
|
/**
|
|
@@ -1681,8 +1520,8 @@ export default class Tracker {
|
|
|
1681
1520
|
* @category TPaaS Tracking
|
|
1682
1521
|
*/
|
|
1683
1522
|
async trackLeaveSportsPage(input) {
|
|
1684
|
-
const
|
|
1685
|
-
const event = buildLeaveSportsPageEvent(
|
|
1523
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1524
|
+
const event = buildLeaveSportsPageEvent(context);
|
|
1686
1525
|
return this.sendTpaasEvent(event);
|
|
1687
1526
|
}
|
|
1688
1527
|
/**
|
|
@@ -1690,8 +1529,8 @@ export default class Tracker {
|
|
|
1690
1529
|
* @category TPaaS Tracking
|
|
1691
1530
|
*/
|
|
1692
1531
|
async trackLeaveSchoolPage(input) {
|
|
1693
|
-
const
|
|
1694
|
-
const event = buildLeaveSchoolPageEvent(
|
|
1532
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1533
|
+
const event = buildLeaveSchoolPageEvent(context);
|
|
1695
1534
|
return this.sendTpaasEvent(event);
|
|
1696
1535
|
}
|
|
1697
1536
|
/**
|
|
@@ -1699,8 +1538,8 @@ export default class Tracker {
|
|
|
1699
1538
|
* @category TPaaS Tracking
|
|
1700
1539
|
*/
|
|
1701
1540
|
async trackLeaveVideoPage(input) {
|
|
1702
|
-
const
|
|
1703
|
-
const event = buildLeaveVideoPageEvent(
|
|
1541
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1542
|
+
const event = buildLeaveVideoPageEvent(context);
|
|
1704
1543
|
return this.sendTpaasEvent(event);
|
|
1705
1544
|
}
|
|
1706
1545
|
/**
|
|
@@ -1708,8 +1547,8 @@ export default class Tracker {
|
|
|
1708
1547
|
* @category TPaaS Tracking
|
|
1709
1548
|
*/
|
|
1710
1549
|
async trackLeaveWeather(input) {
|
|
1711
|
-
const
|
|
1712
|
-
const event = buildLeaveWeatherEvent(
|
|
1550
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1551
|
+
const event = buildLeaveWeatherEvent(context);
|
|
1713
1552
|
return this.sendTpaasEvent(event);
|
|
1714
1553
|
}
|
|
1715
1554
|
/**
|
|
@@ -1717,8 +1556,8 @@ export default class Tracker {
|
|
|
1717
1556
|
* @category TPaaS Tracking
|
|
1718
1557
|
*/
|
|
1719
1558
|
async trackEngagementAd(input) {
|
|
1720
|
-
const
|
|
1721
|
-
const event = buildEngagementAdEvent(
|
|
1559
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1560
|
+
const event = buildEngagementAdEvent(context);
|
|
1722
1561
|
return this.sendTpaasEvent(event);
|
|
1723
1562
|
}
|
|
1724
1563
|
/**
|
|
@@ -1726,8 +1565,8 @@ export default class Tracker {
|
|
|
1726
1565
|
* @category TPaaS Tracking
|
|
1727
1566
|
*/
|
|
1728
1567
|
async trackEngagementAffiliate(input) {
|
|
1729
|
-
const
|
|
1730
|
-
const event = buildEngagementAffiliateEvent(
|
|
1568
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1569
|
+
const event = buildEngagementAffiliateEvent(context);
|
|
1731
1570
|
return this.sendTpaasEvent(event);
|
|
1732
1571
|
}
|
|
1733
1572
|
/**
|
|
@@ -1735,8 +1574,8 @@ export default class Tracker {
|
|
|
1735
1574
|
* @category TPaaS Tracking
|
|
1736
1575
|
*/
|
|
1737
1576
|
async trackEngagementAudio(input) {
|
|
1738
|
-
const
|
|
1739
|
-
const event = buildEngagementAudioEvent(
|
|
1577
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1578
|
+
const event = buildEngagementAudioEvent(context);
|
|
1740
1579
|
return this.sendTpaasEvent(event);
|
|
1741
1580
|
}
|
|
1742
1581
|
/**
|
|
@@ -1744,8 +1583,8 @@ export default class Tracker {
|
|
|
1744
1583
|
* @category TPaaS Tracking
|
|
1745
1584
|
*/
|
|
1746
1585
|
async trackEngagementForm(input) {
|
|
1747
|
-
const
|
|
1748
|
-
const event = buildEngagementFormEvent(
|
|
1586
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1587
|
+
const event = buildEngagementFormEvent(context);
|
|
1749
1588
|
return this.sendTpaasEvent(event);
|
|
1750
1589
|
}
|
|
1751
1590
|
/**
|
|
@@ -1753,8 +1592,8 @@ export default class Tracker {
|
|
|
1753
1592
|
* @category TPaaS Tracking
|
|
1754
1593
|
*/
|
|
1755
1594
|
async trackEngagementOffer(input) {
|
|
1756
|
-
const
|
|
1757
|
-
const event = buildEngagementOfferEvent(
|
|
1595
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1596
|
+
const event = buildEngagementOfferEvent(context);
|
|
1758
1597
|
return this.sendTpaasEvent(event);
|
|
1759
1598
|
}
|
|
1760
1599
|
/**
|
|
@@ -1762,8 +1601,8 @@ export default class Tracker {
|
|
|
1762
1601
|
* @category TPaaS Tracking
|
|
1763
1602
|
*/
|
|
1764
1603
|
async trackEngagementSportsUIElement(input) {
|
|
1765
|
-
const
|
|
1766
|
-
const event = buildEngagementSportsUIElementEvent(
|
|
1604
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1605
|
+
const event = buildEngagementSportsUIElementEvent(context);
|
|
1767
1606
|
return this.sendTpaasEvent(event);
|
|
1768
1607
|
}
|
|
1769
1608
|
/**
|
|
@@ -1771,8 +1610,8 @@ export default class Tracker {
|
|
|
1771
1610
|
* @category TPaaS Tracking
|
|
1772
1611
|
*/
|
|
1773
1612
|
async trackEngagementSchoolUIElement(input) {
|
|
1774
|
-
const
|
|
1775
|
-
const event = buildEngagementSchoolUIElementEvent(
|
|
1613
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1614
|
+
const event = buildEngagementSchoolUIElementEvent(context);
|
|
1776
1615
|
return this.sendTpaasEvent(event);
|
|
1777
1616
|
}
|
|
1778
1617
|
/**
|
|
@@ -1780,8 +1619,8 @@ export default class Tracker {
|
|
|
1780
1619
|
* @category TPaaS Tracking
|
|
1781
1620
|
*/
|
|
1782
1621
|
async trackEngagementTeaser(input) {
|
|
1783
|
-
const
|
|
1784
|
-
const event = buildEngagementTeaserEvent(
|
|
1622
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1623
|
+
const event = buildEngagementTeaserEvent(context);
|
|
1785
1624
|
return this.sendTpaasEvent(event);
|
|
1786
1625
|
}
|
|
1787
1626
|
/**
|
|
@@ -1789,8 +1628,8 @@ export default class Tracker {
|
|
|
1789
1628
|
* @category TPaaS Tracking
|
|
1790
1629
|
*/
|
|
1791
1630
|
async trackEngagementTvModule(input) {
|
|
1792
|
-
const
|
|
1793
|
-
const event = buildEngagementTvModuleEvent(
|
|
1631
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1632
|
+
const event = buildEngagementTvModuleEvent(context);
|
|
1794
1633
|
return this.sendTpaasEvent(event);
|
|
1795
1634
|
}
|
|
1796
1635
|
/**
|
|
@@ -1798,8 +1637,8 @@ export default class Tracker {
|
|
|
1798
1637
|
* @category TPaaS Tracking
|
|
1799
1638
|
*/
|
|
1800
1639
|
async trackEngagementTvSearch(input) {
|
|
1801
|
-
const
|
|
1802
|
-
const event = buildEngagementTvSearchEvent(
|
|
1640
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1641
|
+
const event = buildEngagementTvSearchEvent(context);
|
|
1803
1642
|
return this.sendTpaasEvent(event);
|
|
1804
1643
|
}
|
|
1805
1644
|
/**
|
|
@@ -1807,8 +1646,8 @@ export default class Tracker {
|
|
|
1807
1646
|
* @category TPaaS Tracking
|
|
1808
1647
|
*/
|
|
1809
1648
|
async trackEngagementUIElement(input) {
|
|
1810
|
-
const
|
|
1811
|
-
const event = buildEngagementUIElementEvent(
|
|
1649
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1650
|
+
const event = buildEngagementUIElementEvent(context);
|
|
1812
1651
|
return this.sendTpaasEvent(event);
|
|
1813
1652
|
}
|
|
1814
1653
|
/**
|
|
@@ -1816,8 +1655,8 @@ export default class Tracker {
|
|
|
1816
1655
|
* @category TPaaS Tracking
|
|
1817
1656
|
*/
|
|
1818
1657
|
async trackEngagementVideo(input) {
|
|
1819
|
-
const
|
|
1820
|
-
const event = buildEngagementVideoEvent(
|
|
1658
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1659
|
+
const event = buildEngagementVideoEvent(context);
|
|
1821
1660
|
return this.sendTpaasEvent(event);
|
|
1822
1661
|
}
|
|
1823
1662
|
/**
|
|
@@ -1825,8 +1664,8 @@ export default class Tracker {
|
|
|
1825
1664
|
* @category TPaaS Tracking
|
|
1826
1665
|
*/
|
|
1827
1666
|
async trackEngagementVideoAd(input) {
|
|
1828
|
-
const
|
|
1829
|
-
const event = buildEngagementVideoAdEvent(
|
|
1667
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1668
|
+
const event = buildEngagementVideoAdEvent(context);
|
|
1830
1669
|
return this.sendTpaasEvent(event);
|
|
1831
1670
|
}
|
|
1832
1671
|
/**
|
|
@@ -1834,8 +1673,8 @@ export default class Tracker {
|
|
|
1834
1673
|
* @category TPaaS Tracking
|
|
1835
1674
|
*/
|
|
1836
1675
|
async trackEngagementWidget(input) {
|
|
1837
|
-
const
|
|
1838
|
-
const event = buildEngagementWidgetEvent(
|
|
1676
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1677
|
+
const event = buildEngagementWidgetEvent(context);
|
|
1839
1678
|
return this.sendTpaasEvent(event);
|
|
1840
1679
|
}
|
|
1841
1680
|
/**
|
|
@@ -1843,8 +1682,8 @@ export default class Tracker {
|
|
|
1843
1682
|
* @category TPaaS Tracking
|
|
1844
1683
|
*/
|
|
1845
1684
|
async trackHeartbeatCommercialArticle(input) {
|
|
1846
|
-
const
|
|
1847
|
-
const event = buildHeartbeatCommercialArticleEvent(
|
|
1685
|
+
const context = await prepareTpaasEventContext(this.tpaasContextSource, input);
|
|
1686
|
+
const event = buildHeartbeatCommercialArticleEvent(context);
|
|
1848
1687
|
return this.sendTpaasEvent(event);
|
|
1849
1688
|
}
|
|
1850
1689
|
/**
|
|
@@ -1853,9 +1692,6 @@ export default class Tracker {
|
|
|
1853
1692
|
* @category TPaaS Tracking
|
|
1854
1693
|
*/
|
|
1855
1694
|
async sendTpaasEvent(event) {
|
|
1856
|
-
// Resolve any pending session ID promises
|
|
1857
|
-
// (session was created when the event was built)
|
|
1858
|
-
this.resolveSessionIdPromise();
|
|
1859
1695
|
// The Hybrid use case implements a "bridged" event method, injected into the window scope,
|
|
1860
1696
|
// which is used to send events through the native app.
|
|
1861
1697
|
if (isFunction(this.state.altEventHandler)) {
|
|
@@ -2119,7 +1955,7 @@ export default class Tracker {
|
|
|
2119
1955
|
* If no session exists yet, returns a promise that resolves with the session ID
|
|
2120
1956
|
* when it gets created (typically when the first non-anonymous tracking event is sent).
|
|
2121
1957
|
*
|
|
2122
|
-
* Note: Anonymous events (such as those sent via {@link trackAnonymous} or {@link
|
|
1958
|
+
* Note: Anonymous events (such as those sent via {@link trackAnonymous} or {@link trackAnonymousImpressionUIElement})
|
|
2123
1959
|
* do not create sessions and will not resolve pending session ID promises. The promise will only resolve when a
|
|
2124
1960
|
* non-anonymous tracking event is sent.
|
|
2125
1961
|
*
|
|
@@ -2130,8 +1966,8 @@ export default class Tracker {
|
|
|
2130
1966
|
*/
|
|
2131
1967
|
getSessionId() {
|
|
2132
1968
|
const session = readSession();
|
|
2133
|
-
if (session
|
|
2134
|
-
return Promise.resolve(session.
|
|
1969
|
+
if (session) {
|
|
1970
|
+
return Promise.resolve(generateSessionSDRN(session.sessionId));
|
|
2135
1971
|
}
|
|
2136
1972
|
// No session exists yet, create or return existing promise
|
|
2137
1973
|
if (!this.sessionIdPromise) {
|
|
@@ -2646,9 +2482,9 @@ export default class Tracker {
|
|
|
2646
2482
|
*/
|
|
2647
2483
|
resolveSessionIdPromise() {
|
|
2648
2484
|
const session = readSession();
|
|
2649
|
-
if (session
|
|
2485
|
+
if (session) {
|
|
2650
2486
|
eventBus.emit('tracker:session:new', {
|
|
2651
|
-
sessionId: session.
|
|
2487
|
+
sessionId: generateSessionSDRN(session.sessionId),
|
|
2652
2488
|
});
|
|
2653
2489
|
}
|
|
2654
2490
|
}
|