@financial-times/ads-display
Advanced tools
Comparing version 5.1.0-beta.2 to 5.1.0-beta.3
@@ -34,19 +34,2 @@ import oAds from '@financial-times/ads-legacy-o-ads'; | ||
/** | ||
* Returns an MD5 hashed spoorId for use of Google's PPID | ||
* @param {String} spoorId | ||
*/ | ||
const hashSpoorId = spoorId => { | ||
let hash = 0; | ||
for (let i = 0; i < spoorId.length; i++) { | ||
const char = spoorId.charCodeAt(i); | ||
hash = (hash << 5) - hash + char; | ||
hash |= 0; | ||
} | ||
const hashString = hash < 0 ? "n" + (0 - hash).toString(16) : "p" + hash.toString(16); | ||
return hashString; | ||
}; | ||
/** | ||
* Returns the margin to apply to the viewport as a percentage string given an object of sizes | ||
@@ -711,3 +694,3 @@ * | ||
* Initialise Google Publisher Provided ID | ||
* @param {string} deviceSpoorId - unique identifier to use for PPID generation | ||
* @param {string} deviceSpoorId - unique identifier to use for PPID | ||
*/ | ||
@@ -719,3 +702,3 @@ | ||
googletag.cmd.push(function () { | ||
googletag.pubads().setPublisherProvidedId(hashSpoorId(deviceSpoorId)); | ||
googletag.pubads().setPublisherProvidedId(deviceSpoorId); | ||
googletag.enableServices(); | ||
@@ -722,0 +705,0 @@ }); |
@@ -17,6 +17,6 @@ { | ||
"dependencies": { | ||
"@financial-times/ads-legacy-o-ads": "^5.1.0-beta.2", | ||
"@financial-times/ads-moat-integration": "^5.1.0-beta.2", | ||
"@financial-times/ads-permutive": "^5.1.0-beta.2", | ||
"@financial-times/ads-personalised-consent": "^5.1.0-beta.2", | ||
"@financial-times/ads-legacy-o-ads": "^5.1.0-beta.3", | ||
"@financial-times/ads-moat-integration": "^5.1.0-beta.3", | ||
"@financial-times/ads-permutive": "^5.1.0-beta.3", | ||
"@financial-times/ads-personalised-consent": "^5.1.0-beta.3", | ||
"@financial-times/n-tracking": "^4.0.1", | ||
@@ -34,3 +34,3 @@ "@financial-times/o-tracking": "^4.0.0", | ||
}, | ||
"version": "5.1.0-beta.2" | ||
"version": "5.1.0-beta.3" | ||
} |
44318
804