@schibsted/pulse-sdk 8.0.0-rc.2 → 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 +582 -471
- package/dist/cjs/app-integration.js +3 -3
- package/dist/cjs/builders/actor.js +6 -6
- package/dist/cjs/builders/consents.js +8 -8
- package/dist/cjs/builders/device-browser.js +8 -8
- package/dist/cjs/builders/device-node.js +3 -3
- package/dist/cjs/builders/events-anonymous-node.js +3 -3
- package/dist/cjs/builders/events-node.js +7 -7
- package/dist/cjs/builders/experimentMetadata.js +2 -2
- package/dist/cjs/builders/experiments.js +1 -0
- package/dist/cjs/builders/objects/objects-anonymous-browser.js +2 -2
- package/dist/cjs/builders/objects/objects-anonymous-node.js +9 -9
- package/dist/cjs/builders/objects/objects-browser.js +2 -2
- package/dist/cjs/builders/objects/objects-node.js +10 -10
- package/dist/cjs/builders/objects/utils.js +3 -3
- package/dist/cjs/builders/origin-browser.js +2 -2
- package/dist/cjs/builders/origin-node.js +4 -4
- package/dist/cjs/builders/session-browser.js +6 -80
- package/dist/cjs/cis-sync/cis-browser.js +219 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/cis.js +0 -1
- package/dist/cjs/cis-sync/eventEmitter.js +37 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/index.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/pulse-cookie.js +53 -63
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/storage/pulseStorage.js +28 -21
- package/dist/cjs/cis-sync/storage/storage.js +24 -0
- package/dist/cjs/createPulseTracker.js +4 -4
- package/dist/cjs/identity/actor.js +20 -8
- package/dist/cjs/identity/advertising.js +1 -1
- package/dist/cjs/identity/cis.js +7 -6
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/leaveTracking/index.js +10 -10
- package/dist/cjs/leaveTrackingTpaas/constants.js +2 -7
- package/dist/cjs/leaveTrackingTpaas/index.js +70 -46
- package/dist/cjs/network-browser.js +3 -3
- package/dist/cjs/remoteConfig/index.js +5 -5
- package/dist/cjs/session/store.js +96 -0
- package/dist/cjs/tpaas-builders/builders/catalogVersion.js +9 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/device.js +50 -72
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/navigationType.js +2 -3
- package/dist/cjs/tpaas-builders/builders/pageContent.js +7 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/pageInfo.js +2 -3
- package/dist/cjs/tpaas-builders/builders/pageSports.js +7 -0
- package/dist/cjs/tpaas-builders/builders/provider.js +19 -0
- package/dist/cjs/tpaas-builders/builders/referrer.js +17 -0
- package/dist/cjs/tpaas-builders/builders/session.js +5 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/trackerBuilder.js +2 -3
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/user.js +1 -1
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/utm.js +3 -9
- package/dist/cjs/tpaas-builders/builders.js +326 -0
- package/dist/cjs/tpaas-builders/guards.js +7 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/index.js +3 -0
- 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/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/tpaas-context}/types.js +0 -1
- package/{node_modules/@schibsted/tpaas-schemas/dist/cjs → dist/cjs/tpaas-schemas}/constants.js +189 -158
- package/{node_modules/@schibsted/tpaas-schemas/dist/cjs → dist/cjs/tpaas-schemas}/index.js +1 -0
- package/dist/cjs/tpaas-schemas/types.js +2 -0
- package/dist/cjs/tracker-proxy/consts.js +29 -7
- package/dist/cjs/tracker-proxy/proxy-provider.js +2 -2
- package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/index.js +4 -1
- package/dist/cjs/utils/xDomainId.js +15 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/visibility-observer/index.js +9 -7
- package/dist/cjs/wrapper/types/event.js +5 -0
- package/dist/cjs/wrapper/utils/map-page-to-page-ref.js +13 -0
- package/dist/ejs/Tracker.js +558 -447
- package/dist/ejs/app-integration.js +1 -1
- package/dist/ejs/builders/actor.js +3 -3
- package/dist/ejs/builders/consents.js +4 -4
- package/dist/ejs/builders/device-browser.js +2 -2
- package/dist/ejs/builders/device-node.js +1 -1
- package/dist/ejs/builders/events-anonymous-node.js +1 -1
- package/dist/ejs/builders/events-node.js +4 -4
- package/dist/ejs/builders/experimentMetadata.js +1 -1
- package/dist/ejs/builders/experiments.js +1 -1
- package/dist/ejs/builders/objects/objects-anonymous-browser.js +1 -1
- package/dist/ejs/builders/objects/objects-anonymous-node.js +1 -1
- package/dist/ejs/builders/objects/objects-browser.js +1 -1
- package/dist/ejs/builders/objects/objects-node.js +1 -1
- package/dist/ejs/builders/objects/utils.js +1 -1
- package/dist/ejs/builders/origin-browser.js +1 -1
- package/dist/ejs/builders/origin-node.js +1 -1
- package/dist/ejs/builders/session-browser.js +5 -77
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/cis-browser.js +17 -4
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/cis.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/eventEmitter.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/index.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/pulse-cookie.js +1 -2
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/storage/pulseStorage.js +12 -4
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/storage/storage.js +6 -2
- package/dist/ejs/createPulseTracker.js +1 -1
- package/dist/ejs/identity/actor.js +21 -9
- package/dist/ejs/identity/advertising.js +1 -1
- package/dist/ejs/identity/cis.js +4 -3
- package/dist/ejs/index.js +4 -3
- package/dist/ejs/leaveTracking/index.js +1 -1
- package/dist/ejs/leaveTrackingTpaas/constants.js +1 -5
- package/dist/ejs/leaveTrackingTpaas/index.js +65 -41
- package/dist/ejs/network-browser.js +1 -1
- package/dist/ejs/remoteConfig/index.js +1 -1
- package/dist/ejs/session/store.js +90 -0
- package/dist/ejs/tpaas-builders/builders/catalogVersion.js +6 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/device.js +50 -72
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/navigationType.js +2 -3
- package/dist/ejs/tpaas-builders/builders/pageContent.js +3 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/pageInfo.js +2 -3
- package/dist/ejs/tpaas-builders/builders/pageSports.js +3 -0
- package/dist/ejs/tpaas-builders/builders/provider.js +16 -0
- package/dist/ejs/tpaas-builders/builders/referrer.js +13 -0
- package/dist/ejs/tpaas-builders/builders/session.js +1 -0
- package/dist/ejs/tpaas-builders/builders/trackerBuilder.js +10 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/user.js +1 -1
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/utm.js +3 -9
- package/dist/ejs/tpaas-builders/builders.js +259 -0
- package/dist/ejs/tpaas-builders/guards.js +4 -0
- package/dist/ejs/tpaas-builders/index.js +2 -0
- 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/{node_modules/@schibsted/tpaas-schemas/dist/ejs → dist/ejs/tpaas-schemas}/constants.js +187 -156
- package/{node_modules/@schibsted/tpaas-schemas/dist/ejs → dist/ejs/tpaas-schemas}/index.js +1 -0
- package/dist/ejs/tpaas-schemas/types.js +1 -0
- package/dist/ejs/tracker-proxy/consts.js +29 -7
- package/dist/ejs/tracker-proxy/proxy-provider.js +1 -1
- package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/index.js +1 -0
- package/dist/ejs/utils/xDomainId.js +11 -0
- package/dist/ejs/version.js +1 -1
- package/dist/ejs/visibility-observer/index.js +9 -7
- package/dist/ejs/wrapper/types/event.js +4 -1
- package/dist/ejs/wrapper/utils/map-page-to-page-ref.js +10 -0
- package/dist/types/Tracker.d.ts +198 -93
- package/dist/types/builders/actor.d.ts +3 -2
- package/dist/types/builders/consents.d.ts +3 -3
- package/dist/types/builders/device-node.d.ts +2 -2
- package/dist/types/builders/events-anonymous-node.d.ts +4 -4
- package/dist/types/builders/events-node.d.ts +5 -5
- package/dist/types/builders/experiments.d.ts +1 -0
- package/dist/types/builders/index.d.ts +1 -1
- package/dist/types/builders/objects/objects-anonymous-node.d.ts +1 -1
- package/dist/types/builders/objects/objects-node.d.ts +1 -1
- package/dist/types/builders/origin-node.d.ts +1 -1
- package/dist/types/builders/session-browser.d.ts +1 -13
- package/{node_modules/@schibsted/pulse-cis-sync/dist/types → dist/types/cis-sync}/cis-browser.d.ts +1 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/types → dist/types/cis-sync}/storage/pulseStorage.d.ts +12 -4
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/storage/storage.d.ts +2 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/createPulseTracker.d.ts +1 -1
- package/dist/types/identity/actor.d.ts +3 -3
- package/dist/types/identity/advertising.d.ts +2 -2
- package/dist/types/identity/cis.d.ts +4 -4
- package/dist/types/index.d.ts +7 -8
- package/dist/types/leaveTrackingTpaas/constants.d.ts +1 -5
- package/dist/types/leaveTrackingTpaas/index.d.ts +6 -6
- package/dist/types/leaveTrackingTpaas/types.d.ts +2 -10
- package/dist/types/session/store.d.ts +34 -0
- package/dist/types/tpaas-builders/builders/anonymous.d.ts +3 -0
- package/dist/types/tpaas-builders/builders/baseEvent.d.ts +3 -0
- package/dist/types/tpaas-builders/builders/catalogVersion.d.ts +3 -0
- package/dist/types/tpaas-builders/builders/consents.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/device.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/experiments.d.ts +9 -0
- package/dist/types/tpaas-builders/builders/navigationType.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/pageContent.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/pageInfo.d.ts +7 -0
- package/dist/types/tpaas-builders/builders/pageSports.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/pageviewId.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/provider.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/referrer.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/session.d.ts +4 -0
- package/dist/types/tpaas-builders/builders/time.d.ts +4 -0
- package/dist/types/tpaas-builders/builders/trackerBuilder.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/user.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/utm.d.ts +7 -0
- package/dist/types/tpaas-builders/builders.d.ts +141 -0
- package/dist/types/tpaas-builders/guards.d.ts +2 -0
- package/dist/types/tpaas-builders/index.d.ts +2 -0
- 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 +471 -0
- package/dist/types/tpaas-schemas/index.d.ts +5 -0
- package/dist/types/tpaas-schemas/types/ITpaasEvent.d.ts +130 -0
- package/dist/types/tpaas-schemas/types/schemas/IAnonymousImpressionUIElement.d.ts +58 -0
- package/dist/types/tpaas-schemas/types/schemas/ICompletedHealthAction.d.ts +139 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAd.d.ts +117 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAffiliate.d.ts +144 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAudio.d.ts +213 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementForm.d.ts +111 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementHealthUIElement.d.ts +133 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementOffer.d.ts +107 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementSchoolUIElement.d.ts +107 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementSportsUIElement.d.ts +157 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTeaser.d.ts +114 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTvModule.d.ts +133 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTvSearch.d.ts +142 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementUIElement.d.ts +105 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideo.d.ts +238 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideoAd.d.ts +147 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementWidget.d.ts +91 -0
- package/dist/types/tpaas-schemas/types/schemas/IHeartbeatCommercialArticle.d.ts +96 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionAd.d.ts +115 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionAdSlot.d.ts +89 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionAffiliate.d.ts +142 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionForm.d.ts +113 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionHealthUIElement.d.ts +138 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionOffer.d.ts +109 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionPlayer.d.ts +108 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionSchoolUIElement.d.ts +109 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionSportsUIElement.d.ts +159 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionTeaser.d.ts +112 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionUIElement.d.ts +107 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionWidget.d.ts +89 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveArticle.d.ts +133 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveAudioPage.d.ts +88 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveError.d.ts +95 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveFrontpage.d.ts +83 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLandingpage.d.ts +90 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveListing.d.ts +123 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedArticle.d.ts +139 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedAudioPage.d.ts +97 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedPage.d.ts +90 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedVideoPage.d.ts +97 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeavePage.d.ts +82 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveSchoolPage.d.ts +84 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveSportsPage.d.ts +137 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveVideoPage.d.ts +91 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveWeather.d.ts +96 -0
- package/dist/types/tpaas-schemas/types/schemas/ILoadAd.d.ts +119 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewArticle.d.ts +133 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewAudioPage.d.ts +87 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewError.d.ts +90 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewFrontpage.d.ts +80 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewHealthPage.d.ts +119 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLandingpage.d.ts +76 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewListing.d.ts +118 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedArticle.d.ts +139 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedAudioPage.d.ts +95 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedPage.d.ts +94 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedVideoPage.d.ts +95 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewPage.d.ts +86 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewSchoolPage.d.ts +88 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewSportsPage.d.ts +135 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewTitle.d.ts +92 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewVideoPage.d.ts +87 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewWeather.d.ts +94 -0
- package/dist/types/tpaas-schemas/types/schemas/index.d.ts +63 -0
- package/dist/types/tpaas-schemas/types/templates/IBranded.d.ts +42 -0
- package/dist/types/tpaas-schemas/types/templates/IConsents.d.ts +34 -0
- package/dist/types/tpaas-schemas/types/templates/IContent.d.ts +56 -0
- package/dist/types/tpaas-schemas/types/templates/IDevice.d.ts +62 -0
- package/dist/types/tpaas-schemas/types/templates/IEngagement.d.ts +21 -0
- package/dist/types/tpaas-schemas/types/templates/IExperiments.d.ts +35 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthFood.d.ts +55 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthOrigin.d.ts +27 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthPhysicalActivity.d.ts +36 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthTraining.d.ts +74 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthUserData.d.ts +25 -0
- package/dist/types/tpaas-schemas/types/templates/ILeave.d.ts +54 -0
- package/dist/types/tpaas-schemas/types/templates/ILeaveAudio.d.ts +37 -0
- package/dist/types/tpaas-schemas/types/templates/ILeaveStories.d.ts +34 -0
- package/dist/types/tpaas-schemas/types/templates/ILocation.d.ts +21 -0
- package/dist/types/tpaas-schemas/types/templates/IMetrics.d.ts +32 -0
- package/dist/types/tpaas-schemas/types/templates/IPageRef.d.ts +46 -0
- package/dist/types/tpaas-schemas/types/templates/IPlacement.d.ts +45 -0
- package/dist/types/tpaas-schemas/types/templates/IProvider.d.ts +73 -0
- package/dist/types/tpaas-schemas/types/templates/ISchool.d.ts +74 -0
- package/dist/types/tpaas-schemas/types/templates/ISession.d.ts +33 -0
- package/dist/types/tpaas-schemas/types/templates/ISports.d.ts +98 -0
- package/dist/types/tpaas-schemas/types/templates/ISportsUserFeatures.d.ts +28 -0
- package/dist/types/tpaas-schemas/types/templates/ITime.d.ts +32 -0
- package/dist/types/tpaas-schemas/types/templates/ITracker.d.ts +37 -0
- package/dist/types/tpaas-schemas/types/templates/IUser.d.ts +34 -0
- package/dist/types/tpaas-schemas/types/templates/IUtmTags.d.ts +38 -0
- package/dist/types/tpaas-schemas/types/templates/index.d.ts +27 -0
- package/dist/types/tpaas-schemas/types.d.ts +42 -0
- package/dist/types/tracker-proxy/consts.d.ts +2 -2
- package/dist/types/types.d.ts +21 -17
- package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/index.d.ts +1 -0
- package/dist/types/utils/xDomainId.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/visibility-observer/index.d.ts +6 -1
- package/dist/types/wrapper/engagement/ui-element/types.d.ts +1 -1
- package/dist/types/wrapper/types/base-event.d.ts +1 -1
- package/dist/types/wrapper/types/event.d.ts +4 -2
- package/dist/types/wrapper/types/utils.d.ts +1 -1
- package/dist/types/wrapper/utils/map-page-to-page-ref.d.ts +3 -0
- package/dist/types/wrapper/view/article/types.d.ts +1 -1
- package/dist/types/wrapper/view/frontpage/types.d.ts +1 -1
- package/dist/types/wrapper/view/listing/types.d.ts +1 -1
- package/dist/types/wrapper/view/loginposter/types.d.ts +1 -1
- package/dist/types/wrapper/view/page/types.d.ts +1 -1
- package/dist/types/wrapper/view/salesposter/types.d.ts +1 -1
- package/dist/types/wrapper/view/ui-element/types.d.ts +1 -1
- package/package.json +21 -20
- package/dist/cjs/Tracker.test-d.js +0 -76
- package/dist/ejs/Tracker.test-d.js +0 -71
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.d.ts +0 -26
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.js +0 -273
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/eventEmitter.js +0 -39
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/eventEmitter.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/index.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/pulse-cookie.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/pulseStorage.d.ts +0 -36
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/pulseStorage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/storage.js +0 -21
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/storage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/types.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis-browser.d.ts +0 -26
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis-browser.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis.d.ts +0 -10
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/eventEmitter.d.ts +0 -14
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/eventEmitter.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/index.d.ts +0 -4
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/index.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/pulse-cookie.d.ts +0 -55
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/pulse-cookie.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/pulseStorage.d.ts +0 -36
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/pulseStorage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/storage.d.ts +0 -6
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/storage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/types.d.ts +0 -24
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/types.js +0 -2
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/types.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/cis.d.ts +0 -10
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/eventEmitter.d.ts +0 -14
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/index.d.ts +0 -4
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/pulse-cookie.d.ts +0 -55
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/storage/storage.d.ts +0 -6
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/types.d.ts +0 -24
- package/node_modules/@schibsted/pulse-cis-sync/package.json +0 -44
- package/node_modules/@schibsted/pulse-utils/package.json +0 -36
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders/provider.js +0 -12
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders/referrer.js +0 -19
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders/session.js +0 -114
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders.js +0 -272
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/provider.js +0 -9
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/referrer.js +0 -15
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/session.js +0 -108
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/trackerBuilder.js +0 -11
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders.js +0 -215
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/index.js +0 -1
- package/node_modules/@schibsted/tpaas-event-builder/dist/index.d.ts +0 -5403
- package/node_modules/@schibsted/tpaas-event-builder/package.json +0 -40
- package/node_modules/@schibsted/tpaas-schemas/dist/index.d.ts +0 -6176
- package/node_modules/@schibsted/tpaas-schemas/package.json +0 -35
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/cis-sync}/types.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/anonymous.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/baseEvent.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/consents.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/experiments.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/pageviewId.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/time.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/cookie-config.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/cookie.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/events.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/get.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/getRootDomain.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/merge.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/objects.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/omit.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/randomString.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/throttle.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/webApi.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/cis-sync}/types.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/anonymous.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/baseEvent.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/consents.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/experiments.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/pageviewId.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/time.js +0 -0
- /package/dist/{types/Tracker.test-d.d.ts → ejs/tpaas-context/types.js} +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/cookie-config.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/cookie.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/events.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/get.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/getRootDomain.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/merge.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/objects.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/omit.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/randomString.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/throttle.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/webApi.js +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/cis.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/eventEmitter.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/index.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/pulse-cookie.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/types.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/cookie-config.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/cookie.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/events.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/get.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/getRootDomain.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/merge.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/objects.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/omit.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/randomString.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/throttle.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/webApi.d.ts +0 -0
package/dist/types/Tracker.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { type AdvertisingIdentifiers, type AdvertisingVendor } from '@schibsted/pulse-cis-sync';
|
|
2
|
-
import { getCommonBuildersOutput, type InputParams } from '@schibsted/tpaas-event-builder';
|
|
3
|
-
import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudio, type ILeaveLockedAudioPage, type ILeaveLockedVideo, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type ITpaasEvent, type IViewArticle, type IViewAudio, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudio, type IViewLockedAudioPage, type IViewLockedVideo, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideo, type IViewVideoPage, type IViewWeather } from '@schibsted/tpaas-schemas';
|
|
4
1
|
import logger from 'loglevel';
|
|
5
2
|
import type { ActorInput, Consents, ConsentsInput, DeviceInput, LocationInput, ObjectInput, OriginInput, ProviderInput, TrackerInput } from './builders';
|
|
6
3
|
import { engagementEvent, identityEvent, routableEvent, trackerEvent } from './builders/events';
|
|
7
4
|
import { anonymousEngagementEvent, anonymousTrackerEvent } from './builders/events-anonymous-node';
|
|
5
|
+
import type { AdvertisingIdentifiers, AdvertisingVendor } from './cis-sync';
|
|
8
6
|
import type { Deferred, ResolvedInput } from './defer';
|
|
9
7
|
import { type Listener } from './EventBus/EventBus';
|
|
10
8
|
import type { LeaveEvent, LeaveEventBuilder, LeaveEventOptions } from './leaveTracking/types';
|
|
11
|
-
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
|
+
import type { AnonymousEventInputTypesByTrackingMethod, EventInput, EventInputTypesByTrackingMethod, TrackViewEventOptions } from './types';
|
|
11
|
+
import { type ObserverOptions } from './visibility-observer';
|
|
12
12
|
import type { ClickUIElementInputProperties } from './wrapper/engagement/ui-element/types';
|
|
13
|
-
import type
|
|
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
|
*/
|
|
@@ -74,6 +91,43 @@ export type DeployStage = 'dev' | 'pre' | 'pro';
|
|
|
74
91
|
* **Note** that the `username` and `password` is *for Node.js environments only*.
|
|
75
92
|
*/
|
|
76
93
|
export interface SDKConfigInput {
|
|
94
|
+
/**
|
|
95
|
+
* AdChoices: dictates which advertising identifiers are issued, in relation to advertising consents given by the user.
|
|
96
|
+
* When `true` and `requireAdvertisingOptIn` is `true`, if the user has not given consent to advertising purpose,
|
|
97
|
+
* neither `adId` nor `ppId` are issued.
|
|
98
|
+
* @see requireAdvertisingOptIn
|
|
99
|
+
*/
|
|
100
|
+
adChoicesEnabled?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* The component name to include in tracked events.
|
|
103
|
+
* Automatically populated as `.provider.component` for both TPaaS and legacy events.
|
|
104
|
+
*/
|
|
105
|
+
component?: IProvider['component'];
|
|
106
|
+
/**
|
|
107
|
+
* The component version to include in tracked events.
|
|
108
|
+
* Automatically populated as `.provider.componentVersion` for both TPaaS and legacy events.
|
|
109
|
+
*/
|
|
110
|
+
componentVersion?: IProvider['componentVersion'];
|
|
111
|
+
/**
|
|
112
|
+
* The provider deployment stage to include in tracked events.
|
|
113
|
+
* Automatically populated as `.provider.stage` for TPaaS events.
|
|
114
|
+
*/
|
|
115
|
+
stage: IProvider['stage'];
|
|
116
|
+
/**
|
|
117
|
+
* The product name to include in tracked events.
|
|
118
|
+
* Automatically populated as `.provider.product` for TPaaS events.
|
|
119
|
+
*/
|
|
120
|
+
product: NonNullable<IProvider['product']>;
|
|
121
|
+
/**
|
|
122
|
+
* The product version to include in tracked events.
|
|
123
|
+
* Automatically populated as `.provider.version` for TPaaS events.
|
|
124
|
+
*/
|
|
125
|
+
version: NonNullable<IProvider['version']>;
|
|
126
|
+
/**
|
|
127
|
+
* Provider metadata to include in TPaaS events.
|
|
128
|
+
* Automatically populated as `.provider.name` and `.provider.group`.
|
|
129
|
+
*/
|
|
130
|
+
provider?: Pick<IProvider, 'name' | 'group'>;
|
|
77
131
|
/**
|
|
78
132
|
* Function handler to call in place of the built-in tracker call.
|
|
79
133
|
* @function
|
|
@@ -97,9 +151,24 @@ export interface SDKConfigInput {
|
|
|
97
151
|
*/
|
|
98
152
|
nativeJwe?: string;
|
|
99
153
|
password?: string;
|
|
154
|
+
/**
|
|
155
|
+
* When true, user's consents are (waited and) evaluated in order to instruct the apis to restrict the issuing of
|
|
156
|
+
* advertising identifiers;
|
|
157
|
+
* It has direct effect on the issuing of `adId`.
|
|
158
|
+
* In connection with `adChoicesEnabled` option, restricts the issuing of `ppId` as well.
|
|
159
|
+
* @see adChoicesEnabled
|
|
160
|
+
*/
|
|
100
161
|
requireAdvertisingOptIn?: boolean;
|
|
101
162
|
trackerId?: string;
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated Starting with 8.0.0-rc.13, the SDK will default this config to true instead of undefined (basically false).
|
|
165
|
+
* In v9, this config will be removed and the SDK will always use Beacon when available.
|
|
166
|
+
*/
|
|
102
167
|
useBeacon?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* @deprecated Starting with 8.0.0-rc.13, the SDK will default this config to true instead of undefined (basically false).
|
|
170
|
+
* In v9, this config will be removed and the SDK will always use Beacon when available.
|
|
171
|
+
*/
|
|
103
172
|
useBeaconWhenAvailable?: boolean;
|
|
104
173
|
username?: string;
|
|
105
174
|
vendors?: AdvertisingVendor[];
|
|
@@ -116,37 +185,18 @@ export interface SDKConfigInput {
|
|
|
116
185
|
* @internal
|
|
117
186
|
*/
|
|
118
187
|
export type SDKState = {
|
|
119
|
-
altEventHandler?: AltEventHandler;
|
|
120
|
-
autoCreateConsents?: boolean;
|
|
121
|
-
cisBaseUrl?: string;
|
|
122
|
-
cisEnabled?: boolean;
|
|
123
|
-
collectorBaseUrl?: string;
|
|
124
188
|
collectorPath: string;
|
|
125
|
-
configurationTag?: string;
|
|
126
|
-
consents?: Consents | ConsentsInput | Promise<Consents>;
|
|
127
189
|
deployStage: DeployStage;
|
|
128
190
|
deployStageTpaas: DeployStage;
|
|
129
191
|
environment: 'node' | 'browser';
|
|
130
|
-
eventDebounce?: number;
|
|
131
192
|
includeAdvertising: boolean | Promise<boolean>;
|
|
132
|
-
isHybrid?: boolean;
|
|
133
|
-
nativeJwe?: string;
|
|
134
193
|
pageViewId: string;
|
|
135
|
-
password?: string;
|
|
136
194
|
providerId: string;
|
|
137
195
|
remoteConfigurationUrl: string;
|
|
138
|
-
requireAdvertisingOptIn?: boolean;
|
|
139
196
|
schemaLocation: string;
|
|
140
|
-
trackerId
|
|
197
|
+
trackerId: string;
|
|
141
198
|
tpaasCollectorBaseUrl: string;
|
|
142
|
-
useBeacon?: boolean;
|
|
143
|
-
useBeaconWhenAvailable?: boolean;
|
|
144
|
-
username?: string;
|
|
145
199
|
vendors: AdvertisingVendor[];
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated Xandr sync and AnId functionality no longer supported.
|
|
148
|
-
*/
|
|
149
|
-
xandrEnabled?: boolean;
|
|
150
200
|
} & SDKConfigInput & FallbackSDKConfig;
|
|
151
201
|
/**
|
|
152
202
|
* Input for event builders. Different events will read and process different
|
|
@@ -278,8 +328,18 @@ export default class Tracker {
|
|
|
278
328
|
private bookmark;
|
|
279
329
|
private legacyVisibilityObservers;
|
|
280
330
|
private visibilityObservers;
|
|
281
|
-
|
|
282
|
-
|
|
331
|
+
/**
|
|
332
|
+
* Current page state shared by legacy and TPaaS tracking. See CurrentPageContext for
|
|
333
|
+
* which properties are shared and which are exclusively TPaaS metadata.
|
|
334
|
+
*/
|
|
335
|
+
private currentPageContext;
|
|
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();
|
|
341
|
+
private getCurrentLegacyPage;
|
|
342
|
+
private setCurrentTpaasPageData;
|
|
283
343
|
/**
|
|
284
344
|
* Promise that resolves when a session ID becomes available
|
|
285
345
|
* @private
|
|
@@ -303,7 +363,7 @@ export default class Tracker {
|
|
|
303
363
|
* @param config Options to set the SDK with
|
|
304
364
|
* @param builders Initial values for event properties that will be persisted across events
|
|
305
365
|
*/
|
|
306
|
-
constructor(providerId: string, config
|
|
366
|
+
constructor(providerId: string, config: SDKConfigInput, builders?: Builders);
|
|
307
367
|
/**
|
|
308
368
|
* Add event to the tracker event queue
|
|
309
369
|
*
|
|
@@ -373,32 +433,6 @@ export default class Tracker {
|
|
|
373
433
|
* @category Tracking Anonymous
|
|
374
434
|
*/
|
|
375
435
|
trackAnonymous<T extends AnonymousEventType>(eventType: T, input: AnonymousEventInputTypesByTrackingMethod[T], options?: TrackOptions): Promise<any>;
|
|
376
|
-
private adaptExperiments;
|
|
377
|
-
/**
|
|
378
|
-
*
|
|
379
|
-
* @private
|
|
380
|
-
* @category TPaaS Tracking
|
|
381
|
-
*/
|
|
382
|
-
private prepareAnonymousTpaasEvent;
|
|
383
|
-
/**
|
|
384
|
-
*
|
|
385
|
-
* @private
|
|
386
|
-
* @category TPaaS Tracking
|
|
387
|
-
*/
|
|
388
|
-
private prepareTpaasEvent;
|
|
389
|
-
/**
|
|
390
|
-
* Generate a generic TPaaS event with common builders output
|
|
391
|
-
* The method should be used for experiments, not for real production work.
|
|
392
|
-
* It doesn't have any real TPaaS schema associated with it.
|
|
393
|
-
* The method doesn't queue or send the event, it just returns the merged object.
|
|
394
|
-
* The method can be removed at any time in the future, so use it with caution.
|
|
395
|
-
*
|
|
396
|
-
* @param input - The input object to merge with the common builders output
|
|
397
|
-
* @returns A promise that resolves to the merged object
|
|
398
|
-
* @private
|
|
399
|
-
* @category TPaaS Tracking
|
|
400
|
-
*/
|
|
401
|
-
generateGenericTpaasEvent<T>(input: T): Promise<T & ReturnType<typeof getCommonBuildersOutput>>;
|
|
402
436
|
/**
|
|
403
437
|
* This method extends the list of base experiments that will be automatically included in every event sent by the tracker.
|
|
404
438
|
*
|
|
@@ -466,6 +500,28 @@ export default class Tracker {
|
|
|
466
500
|
* @category Tracking
|
|
467
501
|
*/
|
|
468
502
|
addUIElementVisibilityTracking(selector: string, buildEventFromElement: (element: HTMLElement) => InputParams<IImpressionUIElement>): void;
|
|
503
|
+
/**
|
|
504
|
+
* The `addElementVisibilityObserver` function provides an interface for executing arbitrary code when specific DOM Elements become visible within the viewport.
|
|
505
|
+
* It is built on the `VisibilityObserver` class, which efficiently detects visibility changes in DOM elements.
|
|
506
|
+
* When an element becomes at least 2/3 visible, a callback is triggered, with the Element that invoked the callback call as argument.
|
|
507
|
+
* It leverages the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) for viewport tracking
|
|
508
|
+
* and the [Mutation Observer API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to monitor lazy-loaded elements.
|
|
509
|
+
*
|
|
510
|
+
* Example usage:
|
|
511
|
+
*
|
|
512
|
+
* ```ts
|
|
513
|
+
* tracker.addElementVisibilityObserver('[data-pulse-entity-id]', (element) => {
|
|
514
|
+
* const eventInput = parseElementIntoEventInput(element); // user-defined function
|
|
515
|
+
* tracker.trackImpressionTeaser(eventInput); // can be anything actually, not necessarily a Teaser tracking call
|
|
516
|
+
* });
|
|
517
|
+
* ```
|
|
518
|
+
* @param selector
|
|
519
|
+
* @param callback
|
|
520
|
+
* @param options {ObserverOptions}
|
|
521
|
+
* @param options.threshold - A number between 0 and 1 indicating how much of the element should be visible to trigger
|
|
522
|
+
* the callback. Default is 0.67 (2/3 of the element).
|
|
523
|
+
*/
|
|
524
|
+
addElementVisibilityObserver(selector: string, callback: (element: HTMLElement) => void, options?: ObserverOptions): void;
|
|
469
525
|
private setPageDefaults;
|
|
470
526
|
/**
|
|
471
527
|
* The old trackViewArticle method from the Media Wrapper.
|
|
@@ -550,51 +606,50 @@ export default class Tracker {
|
|
|
550
606
|
* @param input
|
|
551
607
|
* @category TPaaS Tracking
|
|
552
608
|
*/
|
|
553
|
-
|
|
554
|
-
private setCurrentPage;
|
|
609
|
+
trackAnonymousImpressionUIElement(input: InputParams<IAnonymousImpressionUIElement>): Promise<unknown>;
|
|
555
610
|
trackCompletedHealthAction(input: InputParams<ICompletedHealthAction>): Promise<unknown>;
|
|
556
611
|
trackEngagementHealthUIElement(input: InputParams<IEngagementHealthUIElement>): Promise<unknown>;
|
|
557
|
-
trackViewHealthPage(input: InputParams<IViewHealthPage>, options: TrackViewEventOptions): Promise<unknown>;
|
|
612
|
+
trackViewHealthPage(input: InputParams<IViewHealthPage>, options: TrackViewEventOptions<IViewHealthPage>): Promise<unknown>;
|
|
558
613
|
trackImpressionHealthUIElement(input: InputParams<IImpressionHealthUIElement>): Promise<unknown>;
|
|
559
614
|
/**
|
|
560
615
|
* @param input
|
|
561
616
|
* @param options
|
|
562
617
|
* @category TPaaS Tracking
|
|
563
618
|
*/
|
|
564
|
-
trackViewPage(input: InputParams<IViewPage>, options: TrackViewEventOptions): Promise<unknown>;
|
|
619
|
+
trackViewPage(input: InputParams<IViewPage>, options: TrackViewEventOptions<IViewPage>): Promise<unknown>;
|
|
565
620
|
/**
|
|
566
621
|
* @param input
|
|
567
622
|
* @param options
|
|
568
623
|
* @category TPaaS Tracking
|
|
569
624
|
*/
|
|
570
|
-
trackViewSportsPage(input: InputParams<IViewSportsPage>, options: TrackViewEventOptions): Promise<unknown>;
|
|
625
|
+
trackViewSportsPage(input: InputParams<IViewSportsPage>, options: TrackViewEventOptions<IViewSportsPage>): Promise<unknown>;
|
|
571
626
|
/**
|
|
572
627
|
* @param input
|
|
628
|
+
* @param options
|
|
573
629
|
* @category TPaaS Tracking
|
|
574
630
|
*/
|
|
575
|
-
|
|
631
|
+
trackViewSchoolPage(input: InputParams<IViewSchoolPage>, options: TrackViewEventOptions<IViewSchoolPage>): Promise<unknown>;
|
|
576
632
|
/**
|
|
577
633
|
* @param input
|
|
578
634
|
* @category TPaaS Tracking
|
|
579
635
|
*/
|
|
580
|
-
|
|
636
|
+
trackViewTitle(input: InputParams<IViewTitle>): Promise<unknown>;
|
|
581
637
|
/**
|
|
582
638
|
* @param input
|
|
583
639
|
* @category TPaaS Tracking
|
|
584
640
|
*/
|
|
585
|
-
|
|
641
|
+
trackImpressionWidget(input: InputParams<IImpressionWidget>): Promise<unknown>;
|
|
586
642
|
/**
|
|
587
643
|
* @param input
|
|
588
|
-
* @param options
|
|
589
644
|
* @category TPaaS Tracking
|
|
590
645
|
*/
|
|
591
|
-
|
|
646
|
+
trackLoadAd(input: InputParams<ILoadAd>): Promise<unknown>;
|
|
592
647
|
/**
|
|
593
648
|
* @param input
|
|
594
649
|
* @param options
|
|
595
650
|
* @category TPaaS Tracking
|
|
596
651
|
*/
|
|
597
|
-
|
|
652
|
+
trackViewArticle(input: InputParams<IViewArticle>, options: TrackViewEventOptions<IViewArticle>): Promise<unknown>;
|
|
598
653
|
/**
|
|
599
654
|
* Tracks a View AudioPage event and automatically fires a Leave AudioPage event when the user
|
|
600
655
|
* navigates away.
|
|
@@ -635,13 +690,28 @@ export default class Tracker {
|
|
|
635
690
|
* @param options
|
|
636
691
|
* @category TPaaS Tracking
|
|
637
692
|
*/
|
|
638
|
-
trackViewAudioPage(input: InputParams<IViewAudioPage>, options:
|
|
693
|
+
trackViewAudioPage(input: InputParams<IViewAudioPage>, options: TrackViewEventOptions<IViewAudioPage>): Promise<unknown>;
|
|
639
694
|
/**
|
|
640
695
|
* @param input
|
|
641
696
|
* @param options
|
|
642
697
|
* @category TPaaS Tracking
|
|
643
698
|
*/
|
|
644
|
-
trackViewError(input: InputParams<IViewError>, options: TrackViewEventOptions): Promise<unknown>;
|
|
699
|
+
trackViewError(input: InputParams<IViewError>, options: TrackViewEventOptions<IViewError>): Promise<unknown>;
|
|
700
|
+
/**
|
|
701
|
+
* @param input
|
|
702
|
+
* @category TPaaS Tracking
|
|
703
|
+
*/
|
|
704
|
+
trackImpressionAd(input: InputParams<IImpressionAd>): Promise<unknown>;
|
|
705
|
+
/**
|
|
706
|
+
* @param input
|
|
707
|
+
* @category TPaaS Tracking
|
|
708
|
+
*/
|
|
709
|
+
trackImpressionAdSlot(input: InputParams<IImpressionAdSlot>): Promise<unknown>;
|
|
710
|
+
/**
|
|
711
|
+
* @param input
|
|
712
|
+
* @category TPaaS Tracking
|
|
713
|
+
*/
|
|
714
|
+
trackImpressionAffiliate(input: InputParams<IImpressionAffiliate>): Promise<unknown>;
|
|
645
715
|
/**
|
|
646
716
|
* @param input
|
|
647
717
|
* @category TPaaS Tracking
|
|
@@ -661,64 +731,64 @@ export default class Tracker {
|
|
|
661
731
|
* @param input
|
|
662
732
|
* @category TPaaS Tracking
|
|
663
733
|
*/
|
|
664
|
-
|
|
734
|
+
trackImpressionSportsUIElement(input: InputParams<IImpressionSportsUIElement>): Promise<unknown>;
|
|
665
735
|
/**
|
|
666
736
|
* @param input
|
|
667
737
|
* @category TPaaS Tracking
|
|
668
738
|
*/
|
|
669
|
-
|
|
739
|
+
trackImpressionSchoolUIElement(input: InputParams<IImpressionSchoolUIElement>): Promise<unknown>;
|
|
670
740
|
/**
|
|
671
741
|
* @param input
|
|
672
|
-
* @param options
|
|
673
742
|
* @category TPaaS Tracking
|
|
674
743
|
*/
|
|
675
|
-
|
|
744
|
+
trackImpressionTeaser(input: InputParams<IImpressionTeaser>): Promise<unknown>;
|
|
676
745
|
/**
|
|
677
746
|
* @param input
|
|
678
|
-
* @param options
|
|
679
747
|
* @category TPaaS Tracking
|
|
680
748
|
*/
|
|
681
|
-
|
|
749
|
+
trackImpressionUIElement(input: InputParams<IImpressionUIElement>): Promise<unknown>;
|
|
682
750
|
/**
|
|
683
751
|
* @param input
|
|
684
752
|
* @param options
|
|
685
753
|
* @category TPaaS Tracking
|
|
686
754
|
*/
|
|
687
|
-
|
|
755
|
+
trackViewFrontpage(input: InputParams<IViewFrontpage>, options: TrackViewEventOptions<IViewFrontpage>): Promise<unknown>;
|
|
688
756
|
/**
|
|
689
757
|
* @param input
|
|
690
758
|
* @param options
|
|
691
759
|
* @category TPaaS Tracking
|
|
692
760
|
*/
|
|
693
|
-
|
|
761
|
+
trackViewLandingpage(input: InputParams<IViewLandingpage>, options: TrackViewEventOptions<IViewLandingpage>): Promise<unknown>;
|
|
694
762
|
/**
|
|
695
763
|
* @param input
|
|
696
764
|
* @param options
|
|
697
765
|
* @category TPaaS Tracking
|
|
698
766
|
*/
|
|
699
|
-
|
|
767
|
+
trackViewListing(input: InputParams<IViewListing>, options: TrackViewEventOptions<IViewListing>): Promise<unknown>;
|
|
700
768
|
/**
|
|
701
769
|
* @param input
|
|
702
770
|
* @param options
|
|
703
771
|
* @category TPaaS Tracking
|
|
704
772
|
*/
|
|
705
|
-
|
|
773
|
+
trackViewLockedArticle(input: InputParams<IViewLockedArticle>, options: TrackViewEventOptions<IViewLockedArticle>): Promise<unknown>;
|
|
706
774
|
/**
|
|
707
775
|
* @param input
|
|
776
|
+
* @param options
|
|
708
777
|
* @category TPaaS Tracking
|
|
709
778
|
*/
|
|
710
|
-
|
|
779
|
+
trackViewLockedAudioPage(input: InputParams<IViewLockedAudioPage>, options: TrackViewEventOptions<IViewLockedAudioPage>): Promise<unknown>;
|
|
711
780
|
/**
|
|
712
781
|
* @param input
|
|
713
782
|
* @param options
|
|
714
783
|
* @category TPaaS Tracking
|
|
715
784
|
*/
|
|
716
|
-
|
|
785
|
+
trackViewLockedPage(input: InputParams<IViewLockedPage>, options: TrackViewEventOptions<IViewLockedPage>): Promise<unknown>;
|
|
717
786
|
/**
|
|
718
787
|
* @param input
|
|
788
|
+
* @param options
|
|
719
789
|
* @category TPaaS Tracking
|
|
720
790
|
*/
|
|
721
|
-
|
|
791
|
+
trackViewLockedVideoPage(input: InputParams<IViewLockedVideoPage>, options: TrackViewEventOptions<IViewLockedVideoPage>): Promise<unknown>;
|
|
722
792
|
/**
|
|
723
793
|
* Tracks a View VideoPage event and automatically fires a Leave VideoPage event when the user
|
|
724
794
|
* navigates away.
|
|
@@ -761,13 +831,13 @@ export default class Tracker {
|
|
|
761
831
|
* @param options
|
|
762
832
|
* @category TPaaS Tracking
|
|
763
833
|
*/
|
|
764
|
-
trackViewVideoPage(input: InputParams<IViewVideoPage>, options:
|
|
834
|
+
trackViewVideoPage(input: InputParams<IViewVideoPage>, options: TrackViewEventOptions<IViewVideoPage>): Promise<unknown>;
|
|
765
835
|
/**
|
|
766
836
|
* @param input
|
|
767
837
|
* @param options
|
|
768
838
|
* @category TPaaS Tracking
|
|
769
839
|
*/
|
|
770
|
-
trackViewWeather(input: InputParams<IViewWeather>, options: TrackViewEventOptions): Promise<unknown>;
|
|
840
|
+
trackViewWeather(input: InputParams<IViewWeather>, options: TrackViewEventOptions<IViewWeather>): Promise<unknown>;
|
|
771
841
|
/**
|
|
772
842
|
* @param input
|
|
773
843
|
* @category TPaaS Tracking
|
|
@@ -803,11 +873,6 @@ export default class Tracker {
|
|
|
803
873
|
* @category TPaaS Tracking
|
|
804
874
|
*/
|
|
805
875
|
trackLeaveLockedArticle(input: InputParams<ILeaveLockedArticle>): Promise<unknown>;
|
|
806
|
-
/**
|
|
807
|
-
* @param input
|
|
808
|
-
* @category TPaaS Tracking
|
|
809
|
-
*/
|
|
810
|
-
trackLeaveLockedAudio(input: InputParams<ILeaveLockedAudio>): Promise<unknown>;
|
|
811
876
|
/**
|
|
812
877
|
* @param input
|
|
813
878
|
* @category TPaaS Tracking
|
|
@@ -817,7 +882,7 @@ export default class Tracker {
|
|
|
817
882
|
* @param input
|
|
818
883
|
* @category TPaaS Tracking
|
|
819
884
|
*/
|
|
820
|
-
|
|
885
|
+
trackLeaveLockedPage(input: InputParams<ILeaveLockedPage>): Promise<unknown>;
|
|
821
886
|
/**
|
|
822
887
|
* @param input
|
|
823
888
|
* @category TPaaS Tracking
|
|
@@ -833,6 +898,11 @@ export default class Tracker {
|
|
|
833
898
|
* @category TPaaS Tracking
|
|
834
899
|
*/
|
|
835
900
|
trackLeaveSportsPage(input: InputParams<ILeaveSportsPage>): Promise<unknown>;
|
|
901
|
+
/**
|
|
902
|
+
* @param input
|
|
903
|
+
* @category TPaaS Tracking
|
|
904
|
+
*/
|
|
905
|
+
trackLeaveSchoolPage(input: InputParams<ILeaveSchoolPage>): Promise<unknown>;
|
|
836
906
|
/**
|
|
837
907
|
* @param input
|
|
838
908
|
* @category TPaaS Tracking
|
|
@@ -843,6 +913,16 @@ export default class Tracker {
|
|
|
843
913
|
* @category TPaaS Tracking
|
|
844
914
|
*/
|
|
845
915
|
trackLeaveWeather(input: InputParams<ILeaveWeather>): Promise<unknown>;
|
|
916
|
+
/**
|
|
917
|
+
* @param input
|
|
918
|
+
* @category TPaaS Tracking
|
|
919
|
+
*/
|
|
920
|
+
trackEngagementAd(input: InputParams<IEngagementAd>): Promise<unknown>;
|
|
921
|
+
/**
|
|
922
|
+
* @param input
|
|
923
|
+
* @category TPaaS Tracking
|
|
924
|
+
*/
|
|
925
|
+
trackEngagementAffiliate(input: InputParams<IEngagementAffiliate>): Promise<unknown>;
|
|
846
926
|
/**
|
|
847
927
|
* @param input
|
|
848
928
|
* @category TPaaS Tracking
|
|
@@ -858,11 +938,31 @@ export default class Tracker {
|
|
|
858
938
|
* @category TPaaS Tracking
|
|
859
939
|
*/
|
|
860
940
|
trackEngagementOffer(input: InputParams<IEngagementOffer>): Promise<unknown>;
|
|
941
|
+
/**
|
|
942
|
+
* @param input
|
|
943
|
+
* @category TPaaS Tracking
|
|
944
|
+
*/
|
|
945
|
+
trackEngagementSportsUIElement(input: InputParams<IEngagementSportsUIElement>): Promise<unknown>;
|
|
946
|
+
/**
|
|
947
|
+
* @param input
|
|
948
|
+
* @category TPaaS Tracking
|
|
949
|
+
*/
|
|
950
|
+
trackEngagementSchoolUIElement(input: InputParams<IEngagementSchoolUIElement>): Promise<unknown>;
|
|
861
951
|
/**
|
|
862
952
|
* @param input
|
|
863
953
|
* @category TPaaS Tracking
|
|
864
954
|
*/
|
|
865
955
|
trackEngagementTeaser(input: InputParams<IEngagementTeaser>): Promise<unknown>;
|
|
956
|
+
/**
|
|
957
|
+
* @param input
|
|
958
|
+
* @category TPaaS Tracking
|
|
959
|
+
*/
|
|
960
|
+
trackEngagementTvModule(input: InputParams<IEngagementTvModule>): Promise<unknown>;
|
|
961
|
+
/**
|
|
962
|
+
* @param input
|
|
963
|
+
* @category TPaaS Tracking
|
|
964
|
+
*/
|
|
965
|
+
trackEngagementTvSearch(input: InputParams<IEngagementTvSearch>): Promise<unknown>;
|
|
866
966
|
/**
|
|
867
967
|
* @param input
|
|
868
968
|
* @category TPaaS Tracking
|
|
@@ -883,6 +983,11 @@ export default class Tracker {
|
|
|
883
983
|
* @category TPaaS Tracking
|
|
884
984
|
*/
|
|
885
985
|
trackEngagementWidget(input: InputParams<IEngagementWidget>): Promise<unknown>;
|
|
986
|
+
/**
|
|
987
|
+
* @param input
|
|
988
|
+
* @category TPaaS Tracking
|
|
989
|
+
*/
|
|
990
|
+
trackHeartbeatCommercialArticle(input: InputParams<IHeartbeatCommercialArticle>): Promise<unknown>;
|
|
886
991
|
/**
|
|
887
992
|
* this is the method that actually sends the event to the server
|
|
888
993
|
* @private
|
|
@@ -1047,7 +1152,7 @@ export default class Tracker {
|
|
|
1047
1152
|
* If no session exists yet, returns a promise that resolves with the session ID
|
|
1048
1153
|
* when it gets created (typically when the first non-anonymous tracking event is sent).
|
|
1049
1154
|
*
|
|
1050
|
-
* 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})
|
|
1051
1156
|
* do not create sessions and will not resolve pending session ID promises. The promise will only resolve when a
|
|
1052
1157
|
* non-anonymous tracking event is sent.
|
|
1053
1158
|
*
|
|
@@ -1074,11 +1179,11 @@ export default class Tracker {
|
|
|
1074
1179
|
* @internal
|
|
1075
1180
|
* @category Configuration
|
|
1076
1181
|
*/
|
|
1077
|
-
syncRemoteResources(input?:
|
|
1182
|
+
syncRemoteResources(input?: Partial<Builders>, builders?: Builders): Promise<{
|
|
1078
1183
|
adId?: string;
|
|
1079
1184
|
doTracking: boolean;
|
|
1080
1185
|
environmentId?: string;
|
|
1081
|
-
ppId?: import("
|
|
1186
|
+
ppId?: import("./cis-sync").PPIDsByVendor;
|
|
1082
1187
|
}>;
|
|
1083
1188
|
/**
|
|
1084
1189
|
* @internal
|
|
@@ -1286,7 +1391,7 @@ export default class Tracker {
|
|
|
1286
1391
|
* with the added guarantee that a second Leave event will not be triggered if one already has been sent.
|
|
1287
1392
|
* @category TPaaS Leave Tracking
|
|
1288
1393
|
*/
|
|
1289
|
-
trackTpaasActiveLeave(): void
|
|
1394
|
+
trackTpaasActiveLeave(): Promise<void>;
|
|
1290
1395
|
/**
|
|
1291
1396
|
* Check if leave tracking is enabled (if an event will be sent when the user leaves the page)
|
|
1292
1397
|
* ```
|
|
@@ -1308,7 +1413,7 @@ export default class Tracker {
|
|
|
1308
1413
|
/**
|
|
1309
1414
|
* @private
|
|
1310
1415
|
*/
|
|
1311
|
-
private
|
|
1416
|
+
private resolveAnonymousTrackGlobals;
|
|
1312
1417
|
/**
|
|
1313
1418
|
* Send all anonymous events that are in the internal anonymous event queue.
|
|
1314
1419
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Builders } from '../Tracker';
|
|
1
2
|
import type { TrackerEventInput } from './events';
|
|
2
3
|
/**
|
|
3
4
|
* generateActorSDRN
|
|
@@ -24,11 +25,11 @@ export type Actor = {
|
|
|
24
25
|
'spt:userId': string;
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
|
-
* Type guard to check if the input
|
|
28
|
+
* Type guard to check if the input has an Actor Builder
|
|
28
29
|
* @param input
|
|
29
30
|
* @internal
|
|
30
31
|
*/
|
|
31
|
-
export declare function
|
|
32
|
+
export declare function hasActorBuilder(input: unknown): input is Pick<Builders, 'actor'>;
|
|
32
33
|
/**
|
|
33
34
|
* Function to generate a builder for Actor objects.
|
|
34
35
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TrackerEventInput } from './events';
|
|
2
2
|
/**
|
|
3
|
-
* @enum
|
|
3
|
+
* @enum ConsentsCategory
|
|
4
4
|
*/
|
|
5
5
|
export declare enum ConsentsCategory {
|
|
6
6
|
CMP_ANALYTICS = "CMP_ANALYTICS",
|
|
@@ -8,9 +8,9 @@ export declare enum ConsentsCategory {
|
|
|
8
8
|
CMP_ADVERTISING = "CMP_ADVERTISING",
|
|
9
9
|
CMP_PERSONALIZATION = "CMP_PERSONALIZATION"
|
|
10
10
|
}
|
|
11
|
-
export declare const ConsentsSourceValues: readonly [
|
|
11
|
+
export declare const ConsentsSourceValues: readonly ['default', 'cmp', 'cache', 'url'];
|
|
12
12
|
export type ConsentsSource = (typeof ConsentsSourceValues)[number];
|
|
13
|
-
export declare const ConsentsPurposeCategoryStatusValues: readonly [
|
|
13
|
+
export declare const ConsentsPurposeCategoryStatusValues: readonly ['accepted', 'rejected', 'unknown'];
|
|
14
14
|
export type ConsentsPurposeCategoryStatus = (typeof ConsentsPurposeCategoryStatusValues)[number];
|
|
15
15
|
export interface ConsentsBase {
|
|
16
16
|
source?: ConsentsSource;
|
|
@@ -53,7 +53,7 @@ export type Device = {
|
|
|
53
53
|
*
|
|
54
54
|
* @internal
|
|
55
55
|
*/
|
|
56
|
-
export declare const device: (defaultValueHandler: () => unknown) => (input?: Pick<TrackerEventInput,
|
|
56
|
+
export declare const device: (defaultValueHandler: () => unknown) => (input?: Pick<TrackerEventInput, 'device'>) => Device | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* @internal
|
|
59
59
|
*/
|
|
@@ -61,5 +61,5 @@ export declare const defaultValue: () => {};
|
|
|
61
61
|
/**
|
|
62
62
|
* Builder for Device objects.
|
|
63
63
|
*/
|
|
64
|
-
declare const _default: (input?: Pick<TrackerEventInput,
|
|
64
|
+
declare const _default: (input?: Pick<TrackerEventInput, 'device'>) => Device | undefined;
|
|
65
65
|
export default _default;
|
|
@@ -38,8 +38,8 @@ export declare function anonymousTrackerEvent({ eventInput, sdkConfig }?: EventP
|
|
|
38
38
|
experimentMetadata: ExperimentMetadata | undefined;
|
|
39
39
|
object: Record<string, unknown> | undefined;
|
|
40
40
|
origin: {
|
|
41
|
-
'@type'?: string | undefined;
|
|
42
41
|
'@id'?: string | number | undefined;
|
|
42
|
+
'@type'?: string | undefined;
|
|
43
43
|
} & {
|
|
44
44
|
[k: string]: unknown;
|
|
45
45
|
url?: string;
|
|
@@ -50,7 +50,7 @@ export declare function anonymousTrackerEvent({ eventInput, sdkConfig }?: EventP
|
|
|
50
50
|
isAnonymous: boolean;
|
|
51
51
|
};
|
|
52
52
|
export declare namespace anonymousTrackerEvent {
|
|
53
|
-
|
|
53
|
+
export { trackerAnonymousEventInput as defaults };
|
|
54
54
|
}
|
|
55
55
|
export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: EventParams<AnonymousTrackerEventInput>): {
|
|
56
56
|
[k: string]: any;
|
|
@@ -62,8 +62,8 @@ export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: Eve
|
|
|
62
62
|
experimentMetadata: ExperimentMetadata | undefined;
|
|
63
63
|
object: Record<string, unknown> | undefined;
|
|
64
64
|
origin: {
|
|
65
|
-
'@type'?: string | undefined;
|
|
66
65
|
'@id'?: string | number | undefined;
|
|
66
|
+
'@type'?: string | undefined;
|
|
67
67
|
} & {
|
|
68
68
|
[k: string]: unknown;
|
|
69
69
|
url?: string;
|
|
@@ -77,6 +77,6 @@ export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: Eve
|
|
|
77
77
|
'@type': string;
|
|
78
78
|
};
|
|
79
79
|
export declare namespace anonymousEngagementEvent {
|
|
80
|
-
|
|
80
|
+
export { trackerAnonymousEventInput as defaults };
|
|
81
81
|
}
|
|
82
82
|
export {};
|