Open agustinv opened 2 years ago
Good call! This was kicking my ass!
It is there for null but not undefined
function hashFunction(input){
if(input == null || isAlreadyHashed(input)){
return input;
}
return sha256Sync(input.trim().toLowerCase(), {outputEncoding: 'hex'});
}
One could rewrite that first line to handle undefined
Looks like this is resolved incommit e4ebdf48fdfee975755614579e9664be7876a235
https://developers.facebook.com/docs/marketing-api/conversions-api/guides/gtm-server-side
Documentation suggest passing hashed user data as user_data.email_address, etc.
When this data is undefined/null on web container, it does not get removed from server side capi call, instead undefined gets hashed.
Workaround is to use x-fb-ud-em, etc.