@financial-times/o-ads
Advanced tools
Comparing version 12.3.2 to 12.4.1
@@ -34,3 +34,3 @@ "use strict"; | ||
function setupMetrics(definitions, callback) { | ||
function setupMetrics(definitions, callback, disableSampling) { | ||
if (!Array.isArray(definitions)) { | ||
@@ -42,3 +42,3 @@ this.log.warn('Metrics definitions should be an array. o-Ads will not record any metrics.'); | ||
definitions.forEach(function (eDef) { | ||
if (_index.default.inSample(eDef.sampleSize)) { | ||
if (disableSampling || _index.default.inSample(eDef.sampleSize)) { | ||
const triggers = Array.isArray(eDef.triggers) ? eDef.triggers : []; | ||
@@ -45,0 +45,0 @@ triggers.forEach(function (trigger) { |
"use strict"; | ||
// generated by genversion | ||
module.exports = '12.3.2'; | ||
module.exports = '12.4.1'; |
@@ -26,3 +26,3 @@ { | ||
"name": "@financial-times/o-ads", | ||
"version": "12.3.2", | ||
"version": "12.4.1", | ||
"dependencies": { | ||
@@ -55,3 +55,4 @@ "ftdomdelegate": ">=2.2.0 <4.0.0", | ||
"obt": "obt", | ||
"checksizes": "bundlesize" | ||
"checksizes": "bundlesize", | ||
"prepare": "npx snyk protect || npx snyk protect -d || true" | ||
}, | ||
@@ -85,3 +86,3 @@ "devDependencies": { | ||
"release-it": "^7.6.1", | ||
"snyk": "^1.149.0", | ||
"snyk": "^1.169.1", | ||
"watchify": "^3.11.0", | ||
@@ -88,0 +89,0 @@ "webpack": "^4.26.1" |
@@ -15,2 +15,11 @@ # oAds [![CircleCI Status](https://circleci.com/gh/Financial-Times/o-ads.svg?style=shield&circle-token=36a37c6ca27a08408c2575c7834f5f6f5c5c9d21)](https://circleci.com/gh/Financial-Times/o-ads/tree/master) | ||
To build the documentation locally, from the `docs` directory, run: | ||
```bash | ||
bundle install | ||
jekyll build | ||
``` | ||
It will generate a `_site` directory where generated site will be compiled | ||
You can then run the jekyll local server by executing `jekyll serve`. | ||
## Developing | ||
@@ -17,0 +26,0 @@ |
116531
104