@@ -22,7 +22,7 @@ var constructor = function () {
2222 var EMAIL_KEY = 'email' ;
2323
2424 // Dynamic identity type for Rokt's emailsha256 identity value which MP doesn't natively support - will be set during initialization
25- var MAPPED_EMAIL_SHA256_IDENTITY ;
25+ var mappedEmailSha256Key ;
2626
2727 self . name = name ;
2828 self . moduleId = moduleId ;
@@ -91,7 +91,7 @@ var constructor = function () {
9191 // Set dynamic OTHER_IDENTITY based on server settings
9292 // Convert to lowercase since server sends TitleCase (e.g., 'Other' -> 'other')
9393 if ( settings . hashedEmailUserIdentityType ) {
94- MAPPED_EMAIL_SHA256_IDENTITY =
94+ mappedEmailSha256Key =
9595 settings . hashedEmailUserIdentityType . toLowerCase ( ) ;
9696 }
9797
@@ -178,16 +178,16 @@ var constructor = function () {
178178
179179 function replaceOtherIdentityWithEmailsha256 ( userIdentities ) {
180180 var newUserIdentities = mergeObjects ( { } , userIdentities || { } ) ;
181- if ( userIdentities . hasOwnProperty ( MAPPED_EMAIL_SHA256_IDENTITY ) ) {
181+ if ( userIdentities . hasOwnProperty ( mappedEmailSha256Key ) ) {
182182 newUserIdentities [ EMAIL_SHA256_KEY ] =
183- userIdentities [ MAPPED_EMAIL_SHA256_IDENTITY ] ;
184- delete newUserIdentities [ MAPPED_EMAIL_SHA256_IDENTITY ] ;
183+ userIdentities [ mappedEmailSha256Key ] ;
184+ delete newUserIdentities [ mappedEmailSha256Key ] ;
185185 }
186186
187187 return newUserIdentities ;
188188 }
189189
190- function sanitizeIdentities ( _data ) {
190+ function sanitizeEmailIdentities ( _data ) {
191191 var data = mergeObjects ( { } , _data || { } ) ;
192192 if ( _data . hasOwnProperty ( EMAIL_SHA256_KEY ) ) {
193193 delete data [ EMAIL_KEY ] ;
@@ -255,7 +255,7 @@ var constructor = function () {
255255 ) ;
256256
257257 var selectPlacementsOptions = mergeObjects ( options , {
258- attributes : sanitizeIdentities ( selectPlacementsAttributes ) ,
258+ attributes : sanitizeEmailIdentities ( selectPlacementsAttributes ) ,
259259 } ) ;
260260
261261 return self . launcher . selectPlacements ( selectPlacementsOptions ) ;
0 commit comments