@financial-times/ads-display
Advanced tools
Comparing version 0.5.0 to 0.5.1
import { getRootID } from '@financial-times/o-tracking/dist/javascript/core.js'; | ||
import oAds from '@financial-times/o-ads'; | ||
import { broadcast } from '@financial-times/n-tracking'; | ||
import { setUSPrivacy } from '@financial-times/privacy-us-privacy'; | ||
import { getUsPrivacyCookie, setUSPrivacy } from '@financial-times/privacy-us-privacy'; | ||
import adsPermutive from '@financial-times/ads-permutive/src/client'; | ||
@@ -199,3 +199,9 @@ export { default as adsPermutive } from '@financial-times/ads-permutive/src/client'; | ||
function setupMetrics(ignoreSampling) { | ||
const callback = (payload) => broadcast('oTracking.event', payload); | ||
const callback = (payload) => { | ||
const uscookie = getUsPrivacyCookie(); | ||
if (payload) { | ||
payload.us_privacy_cookie = typeof uscookie === 'undefined' ? null : uscookie; | ||
} | ||
return broadcast('oTracking.event', payload) | ||
}; | ||
oAds.utils.setupMetrics(metricsDefinitions, callback, ignoreSampling); | ||
@@ -202,0 +208,0 @@ } |
{ | ||
"name": "@financial-times/ads-display", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Bring ads to your page with the FT specific o-ads configuration", | ||
@@ -41,3 +41,3 @@ "browser": "dist/client.js", | ||
"dependencies": { | ||
"@financial-times/ads-permutive": "^0.5.0", | ||
"@financial-times/ads-permutive": "^0.5.1", | ||
"@financial-times/n-tracking": "^1.3.1", | ||
@@ -44,0 +44,0 @@ "@financial-times/o-ads": "18.3.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50842
894