@@ -31,7 +31,7 @@ export const mobkoiIdSubmodule = {
31
31
return value ? { [ MODULE_NAME ] : value } : undefined ;
32
32
} ,
33
33
34
- getId ( userSyncOptions , gdprConsent ) {
34
+ getId ( userSyncOptions , consentObject ) {
35
35
logInfo ( 'Getting Equativ SAS ID.' ) ;
36
36
37
37
if ( ! storage . cookiesAreEnabled ( ) ) {
@@ -62,7 +62,7 @@ export const mobkoiIdSubmodule = {
62
62
return new Promise ( ( resolve , _reject ) => {
63
63
utils . requestEquativSasId (
64
64
userSyncOptions ,
65
- gdprConsent ,
65
+ consentObject ,
66
66
( sasId ) => {
67
67
if ( ! sasId ) {
68
68
logError ( 'Equativ SAS ID is empty' ) ;
@@ -80,18 +80,24 @@ export const mobkoiIdSubmodule = {
80
80
}
81
81
} ;
82
82
} ,
83
+ eids : {
84
+ 'mobkoiId' : {
85
+ source : 'mobkoi.com' ,
86
+ atype : 1
87
+ } ,
88
+ }
83
89
} ;
84
90
85
91
submodule ( 'userId' , mobkoiIdSubmodule ) ;
86
92
87
93
export const utils = {
88
- requestEquativSasId ( syncUserOptions , gdprConsent , onCompleteCallback ) {
94
+ requestEquativSasId ( syncUserOptions , consentObject , onCompleteCallback ) {
89
95
logInfo ( 'Start requesting Equativ SAS ID' ) ;
90
96
const adServerBaseUrl = deepAccess (
91
97
syncUserOptions ,
92
98
`params.${ PARAM_NAME_AD_SERVER_BASE_URL } ` ) || PROD_AD_SERVER_BASE_URL ;
93
99
94
- const equativPixelUrl = utils . buildEquativPixelUrl ( syncUserOptions , gdprConsent ) ;
100
+ const equativPixelUrl = utils . buildEquativPixelUrl ( syncUserOptions , consentObject ) ;
95
101
logInfo ( 'Equativ SAS ID request URL:' , equativPixelUrl ) ;
96
102
97
103
const url = adServerBaseUrl + '/pixeliframe?' +
@@ -126,14 +132,14 @@ export const utils = {
126
132
/**
127
133
* Build a pixel URL that will be placed in an iframe to fetch the Equativ SAS ID
128
134
*/
129
- buildEquativPixelUrl ( syncUserOptions , gdprConsent ) {
135
+ buildEquativPixelUrl ( syncUserOptions , consentObject ) {
130
136
logInfo ( 'Generating Equativ SAS ID request URL' ) ;
131
137
const adServerBaseUrl =
132
138
deepAccess (
133
139
syncUserOptions ,
134
140
`params.${ PARAM_NAME_AD_SERVER_BASE_URL } ` ) || PROD_AD_SERVER_BASE_URL ;
135
141
136
- const gdprConsentString = gdprConsent && gdprConsent . gdprApplies ? gdprConsent . consentString : '' ;
142
+ const gdprConsentString = consentObject && consentObject . gdpr && consentObject . gdpr . consentString ? consentObject . gdpr . consentString : '' ;
137
143
const smartServerUrl = EQUATIV_BASE_URL + '/getuid?' +
138
144
`url=` + encodeURIComponent ( `${ adServerBaseUrl } /getPixel?value=` ) + '[sas_uid]' +
139
145
`&gdpr_consent=${ gdprConsentString } ` +
0 commit comments