Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@financial-times/ads-display

Package Overview
Dependencies
Maintainers
18
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/ads-display - npm Package Compare versions

Comparing version 4.0.0-beta.16 to 4.0.0-beta.17

28

dist/ads-display.cjs.js

@@ -507,2 +507,11 @@ 'use strict';

/**
* @typedef {Object} oAdsMetricPayload
* @property {string} category
* @property {string} action
* @property {Object} timings
* @property {Object} creative
* @property {Object} advert
*/
// Probability that a page view is chosen to be send ads-related metrics
// This sampling is ignored by `setupMetrics` if the `ignoreSampling`

@@ -554,11 +563,18 @@ // parameter is true

function setupMetrics(ignoreSampling) {
const callback = async ({
advert = {}
} = {}) => {
/**
* @param {oAdsMetricPayload} payload
* @returns
*/
const callback = async payload => {
const uscookie = privacyUsPrivacy.getUsPrivacyForTracking();
const consents = (await getConsentsForTracking()) || {};
consents.usprivacy = uscookie;
return nTracking.broadcast('oTracking.event', { ...advert,
consents
});
if (payload) {
payload.advert = { ...payload.advert,
consents
};
}
return nTracking.broadcast('oTracking.event', payload);
};

@@ -565,0 +581,0 @@

@@ -495,2 +495,11 @@ import oAds from '@financial-times/ads-legacy-o-ads';

/**
* @typedef {Object} oAdsMetricPayload
* @property {string} category
* @property {string} action
* @property {Object} timings
* @property {Object} creative
* @property {Object} advert
*/
// Probability that a page view is chosen to be send ads-related metrics
// This sampling is ignored by `setupMetrics` if the `ignoreSampling`

@@ -542,11 +551,18 @@ // parameter is true

function setupMetrics(ignoreSampling) {
const callback = async ({
advert = {}
} = {}) => {
/**
* @param {oAdsMetricPayload} payload
* @returns
*/
const callback = async payload => {
const uscookie = getUsPrivacyForTracking();
const consents = (await getConsentsForTracking()) || {};
consents.usprivacy = uscookie;
return broadcast('oTracking.event', { ...advert,
consents
});
if (payload) {
payload.advert = { ...payload.advert,
consents
};
}
return broadcast('oTracking.event', payload);
};

@@ -553,0 +569,0 @@

{
"name": "@financial-times/ads-display",
"version": "4.0.0-beta.16",
"version": "4.0.0-beta.17",
"description": "Bring ads to your page with the FT specific o-ads configuration",

@@ -50,6 +50,6 @@ "main": "dist/ads-display.cjs.js",

"dependencies": {
"@financial-times/ads-legacy-o-ads": "^4.0.0-beta.16",
"@financial-times/ads-moat-integration": "^4.0.0-beta.16",
"@financial-times/ads-permutive": "^4.0.0-beta.16",
"@financial-times/ads-personalised-consent": "^4.0.0-beta.16",
"@financial-times/ads-legacy-o-ads": "^4.0.0-beta.17",
"@financial-times/ads-moat-integration": "^4.0.0-beta.17",
"@financial-times/ads-permutive": "^4.0.0-beta.17",
"@financial-times/ads-personalised-consent": "^4.0.0-beta.17",
"@financial-times/n-tracking": "4.0.1",

@@ -56,0 +56,0 @@ "@financial-times/o-tracking": "^4.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc