nl_tokens: Records an event in Criteo
pl_tokens: function recordInCriteo ( eventName , eventProps ) { if ( ! isAdTrackingAllowed ( ) || ! isCriteoEnabled ) { debug ( 'recordInCriteo: [Skipping] ad tracking is not allowed' ) ; return ; } if ( TRACKING_STATE_VALUES . LOADED !== trackingState ) { loadTrackingScripts ( recordInCriteo . bind ( null , eventName , eventProps ) ) ; return ; } const events = [ ] ; events . push ( { event : 'setAccount' , account : TRACKING_IDS . criteo } ) ; events . push ( { event : 'setSiteType' , type : criteoSiteType ( ) } ) ; const normalizedHashedEmail = getNormalizedHashedUserEmail ( user ) ; if ( normalizedHashedEmail ) { events . push ( { event : 'setEmail' , email : [ normalizedHashedEmail ] } ) ; } const conversionEvent = clone ( eventProps ) ; conversionEvent . event = eventName ; events . push ( conversionEvent ) ; // The deep clone is necessary because the Criteo script modifies the objects in the // array which causes the console to display different data than is originally added debug ( 'recordInCriteo: ' + eventName , cloneDeep ( events ) ) ; <mask> . criteo_q . push ( ... events ) ; }