@financial-times/o-ads
Advanced tools
Comparing version 17.0.2 to 17.1.0
@@ -71,2 +71,13 @@ "use strict"; | ||
} | ||
} // This enables setting additional `cust_params` outside `o-ads` based on | ||
// the same API responses. That basically empowers the consuming app to | ||
// use it's own complex serialising logic without needing to touch `o-ads`. | ||
if (typeof this.config.apiResponseHandler === 'function') { | ||
var additionalTargeting = this.config.apiResponseHandler(response); | ||
if (additionalTargeting && typeof additionalTargeting === 'object') { | ||
this.instance.targeting.add(additionalTargeting); | ||
} | ||
} | ||
@@ -73,0 +84,0 @@ |
"use strict"; | ||
// generated by genversion | ||
module.exports = '17.0.2'; | ||
module.exports = '17.1.0'; |
@@ -28,3 +28,3 @@ { | ||
"name": "@financial-times/o-ads", | ||
"version": "17.0.2", | ||
"version": "17.1.0", | ||
"dependencies": { | ||
@@ -31,0 +31,0 @@ "ftdomdelegate": "^4.0.0", |
@@ -21,3 +21,4 @@ module.exports = { | ||
'main.mustache', | ||
'package-lock.json' | ||
'package-lock.json', | ||
'.github/CODEOWNERS' | ||
], | ||
@@ -24,0 +25,0 @@ allowOverrides: [] |
@@ -60,2 +60,12 @@ import utils from '../utils'; | ||
// This enables setting additional `cust_params` outside `o-ads` based on | ||
// the same API responses. That basically empowers the consuming app to | ||
// use it's own complex serialising logic without needing to touch `o-ads`. | ||
if (typeof this.config.apiResponseHandler === 'function') { | ||
const additionalTargeting = this.config.apiResponseHandler(response); | ||
if (additionalTargeting && typeof additionalTargeting === 'object') { | ||
this.instance.targeting.add(additionalTargeting); | ||
} | ||
} | ||
return response; | ||
@@ -62,0 +72,0 @@ }; |
// generated by genversion | ||
module.exports = '17.0.2'; | ||
module.exports = '17.1.0'; |
230718
5989