@schibsted/pulse-sdk 8.0.0-rc.2 → 8.0.0-rc.4
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 +5 -2
- package/dist/cjs/Tracker.test-d.js +2 -0
- package/dist/cjs/identity/cis.js +2 -1
- package/dist/cjs/tracker-proxy/consts.js +10 -0
- package/dist/cjs/version.js +1 -1
- package/dist/ejs/Tracker.js +6 -3
- package/dist/ejs/Tracker.test-d.js +2 -0
- package/dist/ejs/identity/cis.js +2 -1
- package/dist/ejs/tracker-proxy/consts.js +10 -0
- package/dist/ejs/version.js +1 -1
- package/dist/types/Tracker.d.ts +15 -20
- package/dist/types/tracker-proxy/consts.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.d.ts +1 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.js +17 -3
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.js.map +1 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/pulseStorage.d.ts +4 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/pulseStorage.js +15 -5
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/pulseStorage.js.map +1 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/storage.d.ts +1 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/storage.js +5 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/storage.js.map +1 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis-browser.d.ts +1 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis-browser.js +16 -2
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis-browser.js.map +1 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/pulseStorage.d.ts +4 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/pulseStorage.js +12 -3
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/pulseStorage.js.map +1 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/storage.d.ts +1 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/storage.js +5 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/storage.js.map +1 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/cis-browser.d.ts +1 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/storage/pulseStorage.d.ts +4 -0
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/storage/storage.d.ts +1 -0
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders/session.js +19 -6
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/session.js +19 -6
- package/node_modules/@schibsted/tpaas-event-builder/dist/index.d.ts +130 -36
- package/node_modules/@schibsted/tpaas-event-builder/package.json +1 -1
- package/node_modules/@schibsted/tpaas-schemas/dist/cjs/constants.js +88 -69
- package/node_modules/@schibsted/tpaas-schemas/dist/ejs/constants.js +86 -67
- package/node_modules/@schibsted/tpaas-schemas/dist/index.d.ts +238 -108
- package/node_modules/@schibsted/tpaas-schemas/package.json +1 -1
- package/package.json +1 -1
package/dist/cjs/Tracker.js
CHANGED
|
@@ -438,6 +438,9 @@ class Tracker {
|
|
|
438
438
|
return {
|
|
439
439
|
name: exp.name || exp.id,
|
|
440
440
|
variant: exp.variant || '',
|
|
441
|
+
experimentSdrn: exp.id,
|
|
442
|
+
platform: exp.platform || '',
|
|
443
|
+
testId: exp.custom?.testId,
|
|
441
444
|
};
|
|
442
445
|
});
|
|
443
446
|
}
|
|
@@ -1135,7 +1138,7 @@ class Tracker {
|
|
|
1135
1138
|
*/
|
|
1136
1139
|
async trackViewLandingpage(input, options) {
|
|
1137
1140
|
this.newPageView(); // Reset the page view ID if it is not set, to ensure a new page view is tracked
|
|
1138
|
-
this.setCurrentPage(input.object.objectId,
|
|
1141
|
+
this.setCurrentPage(input.object.objectId, tpaas_schemas_1.ViewLandingpage.object.objectType);
|
|
1139
1142
|
const dependencies = await this.prepareTpaasEvent();
|
|
1140
1143
|
const event = (0, tpaas_event_builder_1.buildViewLandingpageEvent)(input, dependencies);
|
|
1141
1144
|
const result = this.sendTpaasEvent(event);
|
|
@@ -1392,7 +1395,7 @@ class Tracker {
|
|
|
1392
1395
|
*/
|
|
1393
1396
|
async trackViewWeather(input, options) {
|
|
1394
1397
|
this.newPageView(); // Reset the page view ID if it is not set, to ensure a new page view is tracked
|
|
1395
|
-
this.setCurrentPage(input.object.objectId,
|
|
1398
|
+
this.setCurrentPage(input.object.objectId, tpaas_schemas_1.ViewWeather.object.objectType);
|
|
1396
1399
|
const dependencies = await this.prepareTpaasEvent();
|
|
1397
1400
|
const event = (0, tpaas_event_builder_1.buildViewWeatherEvent)(input, dependencies);
|
|
1398
1401
|
const result = this.sendTpaasEvent(event);
|
package/dist/cjs/identity/cis.js
CHANGED
|
@@ -45,7 +45,7 @@ const cisSync = async (data, builders, config) => {
|
|
|
45
45
|
// _pulse2data cookie, or just not do the sync.
|
|
46
46
|
//
|
|
47
47
|
const actorPromise = (0, actor_1.evaluateActor)(data, builders);
|
|
48
|
-
const { cisBaseUrl, cisEnabled, includeAdvertising: includeAdvertisingPromise, isHybrid, nativeJwe, providerId, trackerId, vendors, } = config || {};
|
|
48
|
+
const { adChoicesEnabled, cisBaseUrl, cisEnabled, includeAdvertising: includeAdvertisingPromise, isHybrid, nativeJwe, providerId, trackerId, vendors, } = config || {};
|
|
49
49
|
const [includeAdvertising, actor] = await Promise.all([includeAdvertisingPromise, actorPromise]);
|
|
50
50
|
const { id, realm } = actor;
|
|
51
51
|
if (cisEnabled) {
|
|
@@ -53,6 +53,7 @@ const cisSync = async (data, builders, config) => {
|
|
|
53
53
|
return (0, pulse_cis_sync_1.syncWithCis)(
|
|
54
54
|
// @ts-expect-error
|
|
55
55
|
id, nativeJwe, cisBaseUrl, realm, providerId, isHybrid ? 'Hybrid' : 'Web', version_1.SDK_VERSION, {
|
|
56
|
+
adChoicesEnabled,
|
|
56
57
|
includeAdvertising,
|
|
57
58
|
vendors,
|
|
58
59
|
trackerId,
|
|
@@ -62,6 +62,16 @@ exports.TPAAS_ALLOWED_METHODS = [
|
|
|
62
62
|
'trackViewVideo',
|
|
63
63
|
'trackViewVideoPage',
|
|
64
64
|
'trackViewWeather',
|
|
65
|
+
// these are not TPaaS methods,
|
|
66
|
+
// but they're part of this list to not have to duplicate the tracker-tpaas-proxy.ts implementation in tracker-proxy.ts
|
|
67
|
+
'trackLegacyViewArticle',
|
|
68
|
+
'trackLegacyViewLoginPoster',
|
|
69
|
+
'trackLegacyViewSalesPoster',
|
|
70
|
+
'trackLegacyViewListing',
|
|
71
|
+
'trackLegacyViewFrontpage',
|
|
72
|
+
'trackLegacyViewPage',
|
|
73
|
+
'trackLegacyViewUIElement',
|
|
74
|
+
'trackLegacyClickUIElement',
|
|
65
75
|
];
|
|
66
76
|
function isPulseProxyMessage(message) {
|
|
67
77
|
return (message !== null &&
|
package/dist/cjs/version.js
CHANGED
package/dist/ejs/Tracker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parsePulseCookies } from '@schibsted/pulse-cis-sync';
|
|
2
2
|
import { evaluateAndFlatten, isBrowser, isFunction, isPromise, isString, pulseMerge, throttle, } from '@schibsted/pulse-utils';
|
|
3
3
|
import { buildAnonymousViewUIElementEvent, buildCompletedHealthActionEvent, buildEngagementAudioEvent, buildEngagementFormEvent, buildEngagementHealthUIElementEvent, buildEngagementOfferEvent, buildEngagementTeaserEvent, buildEngagementUIElementEvent, buildEngagementVideoAdEvent, buildEngagementVideoEvent, buildEngagementWidgetEvent, buildImpressionAdSlotEvent, buildImpressionFormEvent, buildImpressionHealthUIElementEvent, buildImpressionOfferEvent, buildImpressionPlayerEvent, buildImpressionTeaserEvent, buildImpressionUIElementEvent, buildImpressionWidgetEvent, buildLeaveArticleEvent, buildLeaveAudioPageEvent, buildLeaveErrorEvent, buildLeaveFrontpageEvent, buildLeaveLandingpageEvent, buildLeaveListingEvent, buildLeaveLockedArticleEvent, buildLeaveLockedAudioEvent, buildLeaveLockedAudioPageEvent, buildLeaveLockedVideoEvent, buildLeaveLockedVideoPageEvent, buildLeavePageEvent, buildLeaveSportsPageEvent, buildLeaveVideoPageEvent, buildLeaveWeatherEvent, buildViewArticleEvent, buildViewAudioEvent, buildViewAudioPageEvent, buildViewErrorEvent, buildViewFrontpageEvent, buildViewHealthPageEvent, buildViewLandingpageEvent, buildViewListingEvent, buildViewLockedArticleEvent, buildViewLockedAudioEvent, buildViewLockedAudioPageEvent, buildViewLockedVideoEvent, buildViewLockedVideoPageEvent, buildViewPageEvent, buildViewSportsPageEvent, buildViewTitleEvent, buildViewVideoEvent, buildViewVideoPageEvent, buildViewWeatherEvent, getCommonBuildersOutput, } from '@schibsted/tpaas-event-builder';
|
|
4
|
-
import { LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudioPage, LeaveLockedVideoPage, LeavePage, LeaveSportsPage, LeaveVideoPage, LeaveWeather, ViewArticle, ViewError, ViewFrontpage, ViewListing, ViewLockedArticle, ViewLockedVideo, ViewPage, ViewTitle, } from '@schibsted/tpaas-schemas';
|
|
4
|
+
import { LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudioPage, LeaveLockedVideoPage, LeavePage, LeaveSportsPage, LeaveVideoPage, LeaveWeather, ViewArticle, ViewError, ViewFrontpage, ViewLandingpage, ViewListing, ViewLockedArticle, ViewLockedVideo, ViewPage, ViewTitle, ViewWeather, } from '@schibsted/tpaas-schemas';
|
|
5
5
|
import logger from 'loglevel';
|
|
6
6
|
import { v4 } from 'uuid';
|
|
7
7
|
import { getDefaultAltHandler, getDefaultNativeJwe } from './app-integration';
|
|
@@ -395,6 +395,9 @@ export default class Tracker {
|
|
|
395
395
|
return {
|
|
396
396
|
name: exp.name || exp.id,
|
|
397
397
|
variant: exp.variant || '',
|
|
398
|
+
experimentSdrn: exp.id,
|
|
399
|
+
platform: exp.platform || '',
|
|
400
|
+
testId: exp.custom?.testId,
|
|
398
401
|
};
|
|
399
402
|
});
|
|
400
403
|
}
|
|
@@ -1092,7 +1095,7 @@ export default class Tracker {
|
|
|
1092
1095
|
*/
|
|
1093
1096
|
async trackViewLandingpage(input, options) {
|
|
1094
1097
|
this.newPageView(); // Reset the page view ID if it is not set, to ensure a new page view is tracked
|
|
1095
|
-
this.setCurrentPage(input.object.objectId,
|
|
1098
|
+
this.setCurrentPage(input.object.objectId, ViewLandingpage.object.objectType);
|
|
1096
1099
|
const dependencies = await this.prepareTpaasEvent();
|
|
1097
1100
|
const event = buildViewLandingpageEvent(input, dependencies);
|
|
1098
1101
|
const result = this.sendTpaasEvent(event);
|
|
@@ -1349,7 +1352,7 @@ export default class Tracker {
|
|
|
1349
1352
|
*/
|
|
1350
1353
|
async trackViewWeather(input, options) {
|
|
1351
1354
|
this.newPageView(); // Reset the page view ID if it is not set, to ensure a new page view is tracked
|
|
1352
|
-
this.setCurrentPage(input.object.objectId,
|
|
1355
|
+
this.setCurrentPage(input.object.objectId, ViewWeather.object.objectType);
|
|
1353
1356
|
const dependencies = await this.prepareTpaasEvent();
|
|
1354
1357
|
const event = buildViewWeatherEvent(input, dependencies);
|
|
1355
1358
|
const result = this.sendTpaasEvent(event);
|
package/dist/ejs/identity/cis.js
CHANGED
|
@@ -40,7 +40,7 @@ const cisSync = async (data, builders, config) => {
|
|
|
40
40
|
// _pulse2data cookie, or just not do the sync.
|
|
41
41
|
//
|
|
42
42
|
const actorPromise = evaluateActor(data, builders);
|
|
43
|
-
const { cisBaseUrl, cisEnabled, includeAdvertising: includeAdvertisingPromise, isHybrid, nativeJwe, providerId, trackerId, vendors, } = config || {};
|
|
43
|
+
const { adChoicesEnabled, cisBaseUrl, cisEnabled, includeAdvertising: includeAdvertisingPromise, isHybrid, nativeJwe, providerId, trackerId, vendors, } = config || {};
|
|
44
44
|
const [includeAdvertising, actor] = await Promise.all([includeAdvertisingPromise, actorPromise]);
|
|
45
45
|
const { id, realm } = actor;
|
|
46
46
|
if (cisEnabled) {
|
|
@@ -48,6 +48,7 @@ const cisSync = async (data, builders, config) => {
|
|
|
48
48
|
return syncWithCis(
|
|
49
49
|
// @ts-expect-error
|
|
50
50
|
id, nativeJwe, cisBaseUrl, realm, providerId, isHybrid ? 'Hybrid' : 'Web', SDK_VERSION, {
|
|
51
|
+
adChoicesEnabled,
|
|
51
52
|
includeAdvertising,
|
|
52
53
|
vendors,
|
|
53
54
|
trackerId,
|
|
@@ -58,6 +58,16 @@ export const TPAAS_ALLOWED_METHODS = [
|
|
|
58
58
|
'trackViewVideo',
|
|
59
59
|
'trackViewVideoPage',
|
|
60
60
|
'trackViewWeather',
|
|
61
|
+
// these are not TPaaS methods,
|
|
62
|
+
// but they're part of this list to not have to duplicate the tracker-tpaas-proxy.ts implementation in tracker-proxy.ts
|
|
63
|
+
'trackLegacyViewArticle',
|
|
64
|
+
'trackLegacyViewLoginPoster',
|
|
65
|
+
'trackLegacyViewSalesPoster',
|
|
66
|
+
'trackLegacyViewListing',
|
|
67
|
+
'trackLegacyViewFrontpage',
|
|
68
|
+
'trackLegacyViewPage',
|
|
69
|
+
'trackLegacyViewUIElement',
|
|
70
|
+
'trackLegacyClickUIElement',
|
|
61
71
|
];
|
|
62
72
|
export function isPulseProxyMessage(message) {
|
|
63
73
|
return (message !== null &&
|
package/dist/ejs/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated by bin/generate-version.js. Do not edit manually.
|
|
2
|
-
export const SDK_VERSION = '8.0.0-rc.
|
|
2
|
+
export const SDK_VERSION = '8.0.0-rc.4';
|
package/dist/types/Tracker.d.ts
CHANGED
|
@@ -74,6 +74,13 @@ export type DeployStage = 'dev' | 'pre' | 'pro';
|
|
|
74
74
|
* **Note** that the `username` and `password` is *for Node.js environments only*.
|
|
75
75
|
*/
|
|
76
76
|
export interface SDKConfigInput {
|
|
77
|
+
/**
|
|
78
|
+
* AdChoices: dictates which advertising identifiers are issued, in relation to advertising consents given by the user.
|
|
79
|
+
* When `true` and `requireAdvertisingOptIn` is `true`, if the user has not given consent to advertising purpose,
|
|
80
|
+
* neither `adId` nor `ppId` are issued.
|
|
81
|
+
* @see requireAdvertisingOptIn
|
|
82
|
+
*/
|
|
83
|
+
adChoicesEnabled?: boolean;
|
|
77
84
|
/**
|
|
78
85
|
* Function handler to call in place of the built-in tracker call.
|
|
79
86
|
* @function
|
|
@@ -97,6 +104,13 @@ export interface SDKConfigInput {
|
|
|
97
104
|
*/
|
|
98
105
|
nativeJwe?: string;
|
|
99
106
|
password?: string;
|
|
107
|
+
/**
|
|
108
|
+
* When true, user's consents are (waited and) evaluated in order to instruct the apis to restrict the issuing of
|
|
109
|
+
* advertising identifiers;
|
|
110
|
+
* It has direct effect on the issuing of `adId`.
|
|
111
|
+
* In connection with `adChoicesEnabled` option, restricts the issuing of `ppId` as well.
|
|
112
|
+
* @see adChoicesEnabled
|
|
113
|
+
*/
|
|
100
114
|
requireAdvertisingOptIn?: boolean;
|
|
101
115
|
trackerId?: string;
|
|
102
116
|
useBeacon?: boolean;
|
|
@@ -116,37 +130,18 @@ export interface SDKConfigInput {
|
|
|
116
130
|
* @internal
|
|
117
131
|
*/
|
|
118
132
|
export type SDKState = {
|
|
119
|
-
altEventHandler?: AltEventHandler;
|
|
120
|
-
autoCreateConsents?: boolean;
|
|
121
|
-
cisBaseUrl?: string;
|
|
122
|
-
cisEnabled?: boolean;
|
|
123
|
-
collectorBaseUrl?: string;
|
|
124
133
|
collectorPath: string;
|
|
125
|
-
configurationTag?: string;
|
|
126
|
-
consents?: Consents | ConsentsInput | Promise<Consents>;
|
|
127
134
|
deployStage: DeployStage;
|
|
128
135
|
deployStageTpaas: DeployStage;
|
|
129
136
|
environment: 'node' | 'browser';
|
|
130
|
-
eventDebounce?: number;
|
|
131
137
|
includeAdvertising: boolean | Promise<boolean>;
|
|
132
|
-
isHybrid?: boolean;
|
|
133
|
-
nativeJwe?: string;
|
|
134
138
|
pageViewId: string;
|
|
135
|
-
password?: string;
|
|
136
139
|
providerId: string;
|
|
137
140
|
remoteConfigurationUrl: string;
|
|
138
|
-
requireAdvertisingOptIn?: boolean;
|
|
139
141
|
schemaLocation: string;
|
|
140
|
-
trackerId
|
|
142
|
+
trackerId: string;
|
|
141
143
|
tpaasCollectorBaseUrl: string;
|
|
142
|
-
useBeacon?: boolean;
|
|
143
|
-
useBeaconWhenAvailable?: boolean;
|
|
144
|
-
username?: string;
|
|
145
144
|
vendors: AdvertisingVendor[];
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated Xandr sync and AnId functionality no longer supported.
|
|
148
|
-
*/
|
|
149
|
-
xandrEnabled?: boolean;
|
|
150
145
|
} & SDKConfigInput & FallbackSDKConfig;
|
|
151
146
|
/**
|
|
152
147
|
* Input for event builders. Different events will read and process different
|
|
@@ -17,7 +17,7 @@ export declare const MESSAGE_TYPE_INVOKE = "pulse-tracker-proxy:invoke";
|
|
|
17
17
|
export declare const MESSAGE_TYPE_RETURN = "pulse-tracker-proxy:return";
|
|
18
18
|
export declare const MESSAGE_TYPE_RETURN_ERROR = "pulse-tracker-proxy:return-error";
|
|
19
19
|
export declare const ALLOWED_METHODS: readonly ["track"];
|
|
20
|
-
export declare const TPAAS_ALLOWED_METHODS: readonly ["trackAnonymousViewUIElement", "trackEngagementAudio", "trackEngagementForm", "trackEngagementHealthUIElement", "trackEngagementOffer", "trackEngagementTeaser", "trackEngagementUIElement", "trackEngagementVideo", "trackEngagementVideoAd", "trackEngagementWidget", "trackCompletedHealthAction", "trackImpressionAdSlot", "trackImpressionForm", "trackImpressionHealthUIElement", "trackImpressionOffer", "trackImpressionPlayer", "trackImpressionTeaser", "trackImpressionUIElement", "trackImpressionWidget", "trackLeaveArticle", "trackLeaveAudioPage", "trackLeaveError", "trackLeaveFrontpage", "trackLeaveLandingpage", "trackLeaveListing", "trackLeaveLockedArticle", "trackLeaveLockedAudio", "trackLeaveLockedAudioPage", "trackLeaveLockedVideo", "trackLeaveLockedVideoPage", "trackLeavePage", "trackLeaveVideoPage", "trackLeaveWeather", "trackViewArticle", "trackViewAudio", "trackViewAudioPage", "trackViewError", "trackViewFrontpage", "trackViewHealthPage", "trackViewLandingpage", "trackViewListing", "trackViewLockedArticle", "trackViewLockedAudio", "trackViewLockedAudioPage", "trackViewLockedVideo", "trackViewLockedVideoPage", "trackViewPage", "trackViewTitle", "trackViewVideo", "trackViewVideoPage", "trackViewWeather"];
|
|
20
|
+
export declare const TPAAS_ALLOWED_METHODS: readonly ["trackAnonymousViewUIElement", "trackEngagementAudio", "trackEngagementForm", "trackEngagementHealthUIElement", "trackEngagementOffer", "trackEngagementTeaser", "trackEngagementUIElement", "trackEngagementVideo", "trackEngagementVideoAd", "trackEngagementWidget", "trackCompletedHealthAction", "trackImpressionAdSlot", "trackImpressionForm", "trackImpressionHealthUIElement", "trackImpressionOffer", "trackImpressionPlayer", "trackImpressionTeaser", "trackImpressionUIElement", "trackImpressionWidget", "trackLeaveArticle", "trackLeaveAudioPage", "trackLeaveError", "trackLeaveFrontpage", "trackLeaveLandingpage", "trackLeaveListing", "trackLeaveLockedArticle", "trackLeaveLockedAudio", "trackLeaveLockedAudioPage", "trackLeaveLockedVideo", "trackLeaveLockedVideoPage", "trackLeavePage", "trackLeaveVideoPage", "trackLeaveWeather", "trackViewArticle", "trackViewAudio", "trackViewAudioPage", "trackViewError", "trackViewFrontpage", "trackViewHealthPage", "trackViewLandingpage", "trackViewListing", "trackViewLockedArticle", "trackViewLockedAudio", "trackViewLockedAudioPage", "trackViewLockedVideo", "trackViewLockedVideoPage", "trackViewPage", "trackViewTitle", "trackViewVideo", "trackViewVideoPage", "trackViewWeather", "trackLegacyViewArticle", "trackLegacyViewLoginPoster", "trackLegacyViewSalesPoster", "trackLegacyViewListing", "trackLegacyViewFrontpage", "trackLegacyViewPage", "trackLegacyViewUIElement", "trackLegacyClickUIElement"];
|
|
21
21
|
export declare function isPulseProxyMessage(message: unknown): message is Message;
|
|
22
22
|
export type TrackInvocation = {
|
|
23
23
|
method: 'track';
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "8.0.0-rc.
|
|
1
|
+
export declare const SDK_VERSION = "8.0.0-rc.4";
|
|
@@ -19,6 +19,7 @@ import type { AdvertisingVendor } from './types';
|
|
|
19
19
|
* immediately.
|
|
20
20
|
*/
|
|
21
21
|
export declare function syncWithCis(shortUserId?: string, nativeJwe?: string, userServiceLocation?: string, realm?: string, clientId?: string, trackerType?: string, trackerVersion?: string, options?: {
|
|
22
|
+
adChoicesEnabled?: boolean;
|
|
22
23
|
forceSync: boolean;
|
|
23
24
|
includeAdvertising: boolean;
|
|
24
25
|
trackerId: string;
|
|
@@ -87,11 +87,12 @@ var cisRequestMap = new Map();
|
|
|
87
87
|
*/
|
|
88
88
|
function cisFetch() {
|
|
89
89
|
return __awaiter(this, arguments, void 0, function (_a) {
|
|
90
|
-
var basePath, path;
|
|
91
|
-
var _b = _a === void 0 ? {} : _a, cisLocation = _b.cisLocation, clientId = _b.clientId, includeAdvertising = _b.includeAdvertising, jwe = _b.resolvedJwe, trackerType = _b.trackerType, trackerVersion = _b.trackerVersion, userId = _b.userId, vendors = _b.vendors;
|
|
90
|
+
var basePath, path, features;
|
|
91
|
+
var _b = _a === void 0 ? {} : _a, adChoicesEnabled = _b.adChoicesEnabled, cisLocation = _b.cisLocation, clientId = _b.clientId, includeAdvertising = _b.includeAdvertising, jwe = _b.resolvedJwe, trackerType = _b.trackerType, trackerVersion = _b.trackerVersion, userId = _b.userId, vendors = _b.vendors;
|
|
92
92
|
return __generator(this, function (_c) {
|
|
93
93
|
basePath = (cisLocation === null || cisLocation === void 0 ? void 0 : cisLocation.endsWith('/')) ? cisLocation.slice(0, -1) : cisLocation;
|
|
94
94
|
path = "".concat(basePath).concat(getActorPath(userId));
|
|
95
|
+
features = adChoicesEnabled === true ? ['COP'] : undefined;
|
|
95
96
|
// Using 'toString' here to make unit test mock comparisons easier
|
|
96
97
|
return [2 /*return*/, fetch(new URL(path).toString(), {
|
|
97
98
|
method: 'POST',
|
|
@@ -99,6 +100,7 @@ function cisFetch() {
|
|
|
99
100
|
headers: cisFetchHeaders,
|
|
100
101
|
body: JSON.stringify({
|
|
101
102
|
clientId: clientId,
|
|
103
|
+
features: features,
|
|
102
104
|
includeAdvertising: includeAdvertising,
|
|
103
105
|
jwe: jwe,
|
|
104
106
|
trackerType: trackerType,
|
|
@@ -114,7 +116,7 @@ function cisFetch() {
|
|
|
114
116
|
function cisFetchWithRedirect(_a) {
|
|
115
117
|
return __awaiter(this, arguments, void 0, function (_b, redirectAttempts) {
|
|
116
118
|
var response, responseData;
|
|
117
|
-
var cisLocation = _b.cisLocation, clientId = _b.clientId, includeAdvertising = _b.includeAdvertising, resolvedJwe = _b.resolvedJwe, trackerType = _b.trackerType, trackerVersion = _b.trackerVersion, userId = _b.userId, vendors = _b.vendors;
|
|
119
|
+
var adChoicesEnabled = _b.adChoicesEnabled, cisLocation = _b.cisLocation, clientId = _b.clientId, includeAdvertising = _b.includeAdvertising, resolvedJwe = _b.resolvedJwe, trackerType = _b.trackerType, trackerVersion = _b.trackerVersion, userId = _b.userId, vendors = _b.vendors;
|
|
118
120
|
if (redirectAttempts === void 0) { redirectAttempts = 0; }
|
|
119
121
|
return __generator(this, function (_c) {
|
|
120
122
|
switch (_c.label) {
|
|
@@ -123,6 +125,7 @@ function cisFetchWithRedirect(_a) {
|
|
|
123
125
|
throw new Error('Too many CIS redirects');
|
|
124
126
|
}
|
|
125
127
|
return [4 /*yield*/, cisFetch({
|
|
128
|
+
adChoicesEnabled: adChoicesEnabled,
|
|
126
129
|
cisLocation: cisLocation,
|
|
127
130
|
clientId: clientId,
|
|
128
131
|
includeAdvertising: includeAdvertising,
|
|
@@ -140,6 +143,7 @@ function cisFetchWithRedirect(_a) {
|
|
|
140
143
|
if (responseData.redirectToHost) {
|
|
141
144
|
preferredCISHost = responseData.redirectToHost;
|
|
142
145
|
return [2 /*return*/, cisFetchWithRedirect({
|
|
146
|
+
adChoicesEnabled: adChoicesEnabled,
|
|
143
147
|
resolvedJwe: resolvedJwe,
|
|
144
148
|
userId: userId,
|
|
145
149
|
cisLocation: "https://".concat(preferredCISHost),
|
|
@@ -192,6 +196,7 @@ function serialSyncWithCis(shortUserId_1) {
|
|
|
192
196
|
userId: userId,
|
|
193
197
|
cisLocation: cisLocation,
|
|
194
198
|
clientId: clientId,
|
|
199
|
+
adChoicesEnabled: options === null || options === void 0 ? void 0 : options.adChoicesEnabled,
|
|
195
200
|
trackerType: trackerType,
|
|
196
201
|
trackerVersion: trackerVersion,
|
|
197
202
|
includeAdvertising: options === null || options === void 0 ? void 0 : options.includeAdvertising,
|
|
@@ -203,6 +208,15 @@ function serialSyncWithCis(shortUserId_1) {
|
|
|
203
208
|
? new Date(cisResponseData.refreshAfter).getTime()
|
|
204
209
|
: 0;
|
|
205
210
|
storageData = __assign(__assign({ ppId: {} }, cisResponseData), { prevUserId: shortUserId, refreshAfterTimestamp: refreshAfterTimestamp, includeAdvertising: options === null || options === void 0 ? void 0 : options.includeAdvertising });
|
|
211
|
+
/**
|
|
212
|
+
* AdChoices restricts the issuing of PPID.
|
|
213
|
+
* When the user has NOT consented to advertising purpose, and the application runs with AdChoices rules, the sdk
|
|
214
|
+
* cannot delegate or persist the PPID in localStorage.
|
|
215
|
+
* `adChoicesEnabled` must be explicitly set to `true`. No room for truthy values here.
|
|
216
|
+
*/
|
|
217
|
+
if ((options === null || options === void 0 ? void 0 : options.adChoicesEnabled) === true && (options === null || options === void 0 ? void 0 : options.includeAdvertising) !== true) {
|
|
218
|
+
storageData.ppId = {};
|
|
219
|
+
}
|
|
206
220
|
(0, pulse_cookie_1.serializePulseCookie)(storageData);
|
|
207
221
|
return [2 /*return*/, storageData];
|
|
208
222
|
case 3:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cis-browser.js","sourceRoot":"","sources":["../../src/cis-browser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cis-browser.js","sourceRoot":"","sources":["../../src/cis-browser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqSA,kCA6CC;AAlVD,sDAAkE;AAClE,+CAAsG;AAI9F,IAAA,gBAAgB,GAAK,0BAAY,iBAAjB,CAAkB;AAE1C,IAAM,QAAQ,GAAG,2BAA2B,CAAC;AAC7C,IAAM,QAAQ,GAAG,kBAAkB,CAAC;AAEpC,IAAI,gBAAgB,GAAG,mBAAmB,CAAC;AAE3C;;;;GAIG;AACH,IAAM,YAAY,GAAG;IACnB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACf,CAAC;AAEF;;;GAGG;AACH,IAAM,YAAY,GAAG,UAAC,OAAuB;IAC3C,IAAI,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAC;IAClC,IAAI,OAAO,EAAE,CAAC;QACZ,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC;IAC/B,CAAC;IACD,OAAO,UAAG,QAAQ,cAAI,QAAQ,CAAE,CAAC;AACnC,CAAC,CAAC;AA8BF,IAAM,eAAe,GAAG,IAAI,OAAO,CAAC;IAClC,cAAc,EAAE,kBAAkB;CACnC,CAAC,CAAC;AAEH,IAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC,IAAM,iBAAiB,GAAG,eAAe,CAAC;AAO1C,IAAM,aAAa,GAAG,IAAI,GAAG,EAAyB,CAAC;AAEvD;;;;GAIG;AACH,SAAe,QAAQ;wDAAC,EAUJ;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AW;wDAC/B,WAAoB,EACpB,SAAkB,EAClB,mBAA4B,EAC5B,KAAyB,EACzB,QAAiB,EACjB,WAAoB,EACpB,cAAuB,EACvB,OAMC;;QAVD,sBAAA,EAAA,yBAAyB;;YAYnB,KAAmE,IAAA,2BAAY,EAAC,WAAW,EAAE,OAAO,CAAC,EAAtF,iBAAiB,iBAAA,EAAc,gBAAgB,gBAAA,CAAwC;YACtG,WAAW,GAAG,IAAA,gCAAiB,GAAE,CAAC;YAClC,WAAW,GAAG,mBAAmB,IAAI,QAAQ,CAAC;YAChD,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAC9C,IAAI,iBAAiB,KAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA,EAAE,CAAC;gBAC5C,UAAU,GAAG,iBAAiB,CAC5B,WAAW,EACX,OAAO,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,EAC3B,WAAW,EACX,SAAS,EACT,KAAK,EACL,QAAQ,IAAI,EAAE,EACd,WAAW,IAAI,EAAE,EACjB,cAAc,IAAI,EAAE,EACpB,OAAO,CACR,CAAC;YACJ,CAAC;YAOG,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YACrD,IAAI,gBAAgB,KAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA,EAAE,CAAC;gBAC3C,iBAAiB,GAAG,UAAU,CAAC;YACjC,CAAC;YAED,sBAAO,iBAAiB,EAAC;;;CAC1B"}
|
|
@@ -27,6 +27,10 @@ export type CisCache = {
|
|
|
27
27
|
includeAdvertising?: boolean;
|
|
28
28
|
};
|
|
29
29
|
export type PulseStorage = PulseCookie & PPID & CisCache;
|
|
30
|
+
export declare const pulseStorageKeys: {
|
|
31
|
+
PULSE_PPID_STORAGE_KEY: string;
|
|
32
|
+
PULSE_CIS_CACHE_STORAGE_KEY: string;
|
|
33
|
+
};
|
|
30
34
|
declare const _default: {
|
|
31
35
|
getCisCacheFromStorage: () => CisCache;
|
|
32
36
|
setCisCacheToStorage: (cisPayload: CisCache) => boolean;
|
|
@@ -33,8 +33,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.pulseStorageKeys = void 0;
|
|
36
37
|
var storage = __importStar(require("./storage"));
|
|
37
|
-
|
|
38
|
+
exports.pulseStorageKeys = {
|
|
38
39
|
PULSE_PPID_STORAGE_KEY: '_pulse.internal.identity.ppid',
|
|
39
40
|
PULSE_CIS_CACHE_STORAGE_KEY: '_pulse.internal.identity.cis',
|
|
40
41
|
};
|
|
@@ -42,7 +43,7 @@ var getPPIDsFromStorage = function () {
|
|
|
42
43
|
var _a;
|
|
43
44
|
try {
|
|
44
45
|
var webStorage = storage.getStorage();
|
|
45
|
-
return JSON.parse((_a = webStorage.getItem(pulseStorageKeys.PULSE_PPID_STORAGE_KEY)) !== null && _a !== void 0 ? _a : '');
|
|
46
|
+
return JSON.parse((_a = webStorage.getItem(exports.pulseStorageKeys.PULSE_PPID_STORAGE_KEY)) !== null && _a !== void 0 ? _a : '{}');
|
|
46
47
|
}
|
|
47
48
|
catch (_err) {
|
|
48
49
|
return {};
|
|
@@ -51,7 +52,16 @@ var getPPIDsFromStorage = function () {
|
|
|
51
52
|
var setPPIDsToStorage = function (ppid) {
|
|
52
53
|
try {
|
|
53
54
|
var webStorage = storage.getStorage();
|
|
54
|
-
|
|
55
|
+
/**
|
|
56
|
+
* we maintain the interface consistent with the ppId api, but there is no need to persist an empty object in
|
|
57
|
+
* localStorage. We normalise back when we read the value.
|
|
58
|
+
* @see getPPIDsFromStorage
|
|
59
|
+
*/
|
|
60
|
+
if (Object.keys(ppid).length === 0) {
|
|
61
|
+
webStorage.removeItem(exports.pulseStorageKeys.PULSE_PPID_STORAGE_KEY);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
webStorage.setItem(exports.pulseStorageKeys.PULSE_PPID_STORAGE_KEY, JSON.stringify(ppid));
|
|
55
65
|
return true;
|
|
56
66
|
}
|
|
57
67
|
catch (_err) {
|
|
@@ -62,7 +72,7 @@ var getCisCacheFromStorage = function () {
|
|
|
62
72
|
var _a;
|
|
63
73
|
try {
|
|
64
74
|
var webStorage = storage.getStorage();
|
|
65
|
-
return JSON.parse((_a = webStorage.getItem(pulseStorageKeys.PULSE_CIS_CACHE_STORAGE_KEY)) !== null && _a !== void 0 ? _a : '');
|
|
75
|
+
return JSON.parse((_a = webStorage.getItem(exports.pulseStorageKeys.PULSE_CIS_CACHE_STORAGE_KEY)) !== null && _a !== void 0 ? _a : '{}');
|
|
66
76
|
}
|
|
67
77
|
catch (_err) {
|
|
68
78
|
return {};
|
|
@@ -71,7 +81,7 @@ var getCisCacheFromStorage = function () {
|
|
|
71
81
|
var setCisCacheToStorage = function (cisPayload) {
|
|
72
82
|
try {
|
|
73
83
|
var webStorage = storage.getStorage();
|
|
74
|
-
webStorage.setItem(pulseStorageKeys.PULSE_CIS_CACHE_STORAGE_KEY, JSON.stringify(cisPayload));
|
|
84
|
+
webStorage.setItem(exports.pulseStorageKeys.PULSE_CIS_CACHE_STORAGE_KEY, JSON.stringify(cisPayload));
|
|
75
85
|
return true;
|
|
76
86
|
}
|
|
77
87
|
catch (_err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulseStorage.js","sourceRoot":"","sources":["../../../src/storage/pulseStorage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pulseStorage.js","sourceRoot":"","sources":["../../../src/storage/pulseStorage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAqC;AAkCxB,QAAA,gBAAgB,GAAG;IAC9B,sBAAsB,EAAE,+BAA+B;IACvD,2BAA2B,EAAE,8BAA8B;CAC5D,CAAC;AAEF,IAAM,m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O,CAAC,UAAU,EAAE,CAAC;QACxC,UAAU,CAAC,OAAO,CAAC,wBAAgB,CAAC,2BAA2B,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QAC7F,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,IAAI,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe;IACb,sBAAsB,wBAAA;IACtB,oBAAoB,sBAAA;IACpB,mBAAmB,qBAAA;IACnB,iBAAiB,mBAAA;CAClB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type StorageType } from '@schibsted/pulse-utils';
|
|
2
2
|
declare const getStorage: (storageType?: StorageType) => {
|
|
3
3
|
getItem: (key: string) => string | null | undefined;
|
|
4
|
+
removeItem: (key: string) => void;
|
|
4
5
|
setItem: (key: string, value: string) => void;
|
|
5
6
|
};
|
|
6
7
|
export { getStorage };
|
|
@@ -8,12 +8,17 @@ var getStorage = function (storageType) {
|
|
|
8
8
|
var getItem = function (key) {
|
|
9
9
|
return pulse_utils_1.isBrowser && storage ? storage.getItem(key) : undefined;
|
|
10
10
|
};
|
|
11
|
+
var removeItem = function (key) {
|
|
12
|
+
if (pulse_utils_1.isBrowser && storage)
|
|
13
|
+
storage.removeItem(key);
|
|
14
|
+
};
|
|
11
15
|
var setItem = function (key, value) {
|
|
12
16
|
if (pulse_utils_1.isBrowser && storage)
|
|
13
17
|
storage.setItem(key, value);
|
|
14
18
|
};
|
|
15
19
|
return {
|
|
16
20
|
getItem: getItem,
|
|
21
|
+
removeItem: removeItem,
|
|
17
22
|
setItem: setItem,
|
|
18
23
|
};
|
|
19
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/storage/storage.ts"],"names":[],"mappings":";;;AAAA,sDAA6E;AAE7E,IAAM,UAAU,GAAG,UAAC,WAAyC;IAAzC,4BAAA,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AA;KACR,CAAC;AACJ,CAAC,CAAC;AAEO,gCAAU"}
|
|
@@ -19,6 +19,7 @@ import type { AdvertisingVendor } from './types';
|
|
|
19
19
|
* immediately.
|
|
20
20
|
*/
|
|
21
21
|
export declare function syncWithCis(shortUserId?: string, nativeJwe?: string, userServiceLocation?: string, realm?: string, clientId?: string, trackerType?: string, trackerVersion?: string, options?: {
|
|
22
|
+
adChoicesEnabled?: boolean;
|
|
22
23
|
forceSync: boolean;
|
|
23
24
|
includeAdvertising: boolean;
|
|
24
25
|
trackerId: string;
|
|
@@ -35,9 +35,10 @@ const cisRequestMap = new Map();
|
|
|
35
35
|
*
|
|
36
36
|
* @private
|
|
37
37
|
*/
|
|
38
|
-
async function cisFetch({ cisLocation, clientId, includeAdvertising, resolvedJwe: jwe, trackerType, trackerVersion, userId, vendors, } = {}) {
|
|
38
|
+
async function cisFetch({ adChoicesEnabled, cisLocation, clientId, includeAdvertising, resolvedJwe: jwe, trackerType, trackerVersion, userId, vendors, } = {}) {
|
|
39
39
|
const basePath = cisLocation?.endsWith('/') ? cisLocation.slice(0, -1) : cisLocation;
|
|
40
40
|
const path = `${basePath}${getActorPath(userId)}`;
|
|
41
|
+
const features = adChoicesEnabled === true ? ['COP'] : undefined;
|
|
41
42
|
// Using 'toString' here to make unit test mock comparisons easier
|
|
42
43
|
return fetch(new URL(path).toString(), {
|
|
43
44
|
method: 'POST',
|
|
@@ -45,6 +46,7 @@ async function cisFetch({ cisLocation, clientId, includeAdvertising, resolvedJwe
|
|
|
45
46
|
headers: cisFetchHeaders,
|
|
46
47
|
body: JSON.stringify({
|
|
47
48
|
clientId,
|
|
49
|
+
features,
|
|
48
50
|
includeAdvertising,
|
|
49
51
|
jwe,
|
|
50
52
|
trackerType,
|
|
@@ -55,11 +57,12 @@ async function cisFetch({ cisLocation, clientId, includeAdvertising, resolvedJwe
|
|
|
55
57
|
});
|
|
56
58
|
}
|
|
57
59
|
/** Identify recursively until no `redirectToHost` field */
|
|
58
|
-
async function cisFetchWithRedirect({ cisLocation, clientId, includeAdvertising, resolvedJwe, trackerType, trackerVersion, userId, vendors, }, redirectAttempts = 0) {
|
|
60
|
+
async function cisFetchWithRedirect({ adChoicesEnabled, cisLocation, clientId, includeAdvertising, resolvedJwe, trackerType, trackerVersion, userId, vendors, }, redirectAttempts = 0) {
|
|
59
61
|
if (redirectAttempts > CIS_MAX_REDIRECT_ATTEMPTS) {
|
|
60
62
|
throw new Error('Too many CIS redirects');
|
|
61
63
|
}
|
|
62
64
|
const response = await cisFetch({
|
|
65
|
+
adChoicesEnabled,
|
|
63
66
|
cisLocation,
|
|
64
67
|
clientId,
|
|
65
68
|
includeAdvertising,
|
|
@@ -73,6 +76,7 @@ async function cisFetchWithRedirect({ cisLocation, clientId, includeAdvertising,
|
|
|
73
76
|
if (responseData.redirectToHost) {
|
|
74
77
|
preferredCISHost = responseData.redirectToHost;
|
|
75
78
|
return cisFetchWithRedirect({
|
|
79
|
+
adChoicesEnabled,
|
|
76
80
|
resolvedJwe,
|
|
77
81
|
userId,
|
|
78
82
|
cisLocation: `https://${preferredCISHost}`,
|
|
@@ -121,6 +125,7 @@ forceSync = false, cisLocation, nativeJwe, realm, clientId, trackerType, tracker
|
|
|
121
125
|
userId,
|
|
122
126
|
cisLocation,
|
|
123
127
|
clientId,
|
|
128
|
+
adChoicesEnabled: options?.adChoicesEnabled,
|
|
124
129
|
trackerType,
|
|
125
130
|
trackerVersion,
|
|
126
131
|
includeAdvertising: options?.includeAdvertising,
|
|
@@ -136,6 +141,15 @@ forceSync = false, cisLocation, nativeJwe, realm, clientId, trackerType, tracker
|
|
|
136
141
|
refreshAfterTimestamp,
|
|
137
142
|
includeAdvertising: options?.includeAdvertising,
|
|
138
143
|
};
|
|
144
|
+
/**
|
|
145
|
+
* AdChoices restricts the issuing of PPID.
|
|
146
|
+
* When the user has NOT consented to advertising purpose, and the application runs with AdChoices rules, the sdk
|
|
147
|
+
* cannot delegate or persist the PPID in localStorage.
|
|
148
|
+
* `adChoicesEnabled` must be explicitly set to `true`. No room for truthy values here.
|
|
149
|
+
*/
|
|
150
|
+
if (options?.adChoicesEnabled === true && options?.includeAdvertising !== true) {
|
|
151
|
+
storageData.ppId = {};
|
|
152
|
+
}
|
|
139
153
|
serializePulseCookie(storageData);
|
|
140
154
|
return storageData;
|
|
141
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cis-browser.js","sourceRoot":"","sources":["../../src/cis-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAItG,MAAM,EAAE,gBAAgB,EAAE,GAAG,YAAY,CAAC;AAE1C,MAAM,QAAQ,GAAG,2BAA2B,CAAC;AAC7C,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAEpC,IAAI,gBAAgB,GAAG,mBAAmB,CAAC;AAE3C;;;;GAIG;AACH,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,YAAY,GAAG,CAAC,OAAuB,EAAU,EAAE;IACvD,IAAI,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAC;IAClC,IAAI,OAAO,EAAE,CAAC;QACZ,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC;IAC/B,CAAC;IACD,OAAO,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;AACnC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cis-browser.js","sourceRoot":"","sources":["../../src/cis-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CA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C,CAAC;IACrD,IAAI,gBAAgB,IAAI,OAAO,EAAE,SAAS,EAAE,CAAC;QAC3C,iBAAiB,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
|
|
@@ -27,6 +27,10 @@ export type CisCache = {
|
|
|
27
27
|
includeAdvertising?: boolean;
|
|
28
28
|
};
|
|
29
29
|
export type PulseStorage = PulseCookie & PPID & CisCache;
|
|
30
|
+
export declare const pulseStorageKeys: {
|
|
31
|
+
PULSE_PPID_STORAGE_KEY: string;
|
|
32
|
+
PULSE_CIS_CACHE_STORAGE_KEY: string;
|
|
33
|
+
};
|
|
30
34
|
declare const _default: {
|
|
31
35
|
getCisCacheFromStorage: () => CisCache;
|
|
32
36
|
setCisCacheToStorage: (cisPayload: CisCache) => boolean;
|