{"_id":"@financial-times/ads-partner-content","_rev":"87-f971bc0f9d78365f3f7b1536929fa838","name":"@financial-times/ads-partner-content","dist-tags":{"maintenance":"1.4.3","latest":"3.3.0","pre-release":"4.0.0-beta.11"},"versions":{"0.0.1-beta.2":{"name":"@financial-times/ads-partner-content","version":"0.0.1-beta.2","_id":"@financial-times/ads-partner-content@0.0.1-beta.2","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"1d9d7798c05bd8d848858ce414f5b87d9adbc8bf","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.0.1-beta.2.tgz","fileCount":36,"integrity":"sha512-62OzhEPGV8U4nYr1CUZfJbtiHaEJb0at37ctbo3FasL/fJNOfnL9RrT1/hL1eq6ugecOUWSPaOpCmS8FGmQCUg==","signatures":[{"sig":"MEQCIEmFkAmTK+HnQLgeMN4RYb3kotp8Hs7YGA/iaz6s1f+MAiB6UltEcYpt+RCCJbmAu9t7pwUYSC4XQhNv2Hn9x/MbGA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffxpICRA9TVsSAnZWagAAbMYQAJxp+zeGCsHk7ir/Llbk\nzT8CV/UQj+Ni4uNwRr3udzJOmMxH6jnRTaryZVgTLSLGpEgrEdKcSTY/VPMj\n+CEC6ZiRHAR05gLronsVT6zgou+BjsA9Z/G556Ur8s3IUKTVJb55aD6NXkrJ\nNt5jeytFZIhSdnj0ezTRK8XYEwr3F77i/l9C1CViPkR1joueK5hSUq/mgFYZ\nF3enf0AlApfxB6QKMELWoLTRhggHDLyFz0bnv6IEwK1Etcw2TIcCFGJAIXw8\nEOwIVTyISHsRvyAE2wSgVC+Cu+ENRBlJg/7EH6A5cs2CnOLuQ8gVJHWUAKNh\nl60hYEWb5rkx2eALKNAHhRvErfA/E2Plijn21P1/Idq4b+td1nOC0QTbzfP2\ndd0nACNLRFKO/W+eNNO4mzJaZ1ysfXdBM8Q7FE9X6z2/WwUzlyqmOBCoIbCs\naeKKzZHM6iwDcCjkG/ziGbYr6tzF4o8FsUJ6rraCkOYaelgACutHYqsaoq3/\nG55XNmMJaBfcQwRGfREV/MGpX89FhRllHynlCl0OEgR+fx3TeVSh0pZoOe7V\nHpvT1+pjkxraJBIsJyg98VGbSZXLgce4prsvr2mDD5ShMXDJpV0FZBHX1pHA\nSVRNtBlKdREWXPsdO4hIyyIoWcBkIZGuxHpAlOORCOq0gRGDlvnATXxDWuSc\nfbQu\r\n=a6jN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.0.1-beta.2_1602165320243_0.12002164366457158","host":"s3://npm-registry-packages"}},"0.0.1-beta.3":{"name":"@financial-times/ads-partner-content","version":"0.0.1-beta.3","_id":"@financial-times/ads-partner-content@0.0.1-beta.3","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"2ab92932039a0393d2ec300b4602dd38cc791de4","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.0.1-beta.3.tgz","fileCount":36,"integrity":"sha512-uFYb6yhT/dtXZLunhTClHTobiTRNIzd2wnDF7LkOXFJsHnlFeTZ5Tv61qcqZ6GiYE37T6S8uDElJkko0pbwgUQ==","signatures":[{"sig":"MEQCIDXuN9W2rOP48aSbvYIWAataLH+Dfyxs5aTYxUIvBRnnAiBHDKIBHT1a7OqOsgbx7F1gvCc0GfBi9qfun8PoiwANJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgErLCRA9TVsSAnZWagAAL+MQAJ+wxbboMb7jhzvN/Wda\niPjPzP5HxfymcLX9ZPT1/iRz6lMCs2PTPMi5+eeCS9vXR8++QhW4zFmfs9e3\npzQWK0/t/0Z/tyoT1Gn4gBcK3Bc6rKuYFgi6J9BTPwl7Ulw9xgSZ/TUgZA+M\n5MSF1b6FK/OogRc2dSw/0bqeABCEbc2PXGgIxmY4gRU8M73Wkk/ybQC+Xlev\n1wd3ij7zFFNrARo7+ThiZremwErQhh5ugPNwxbNLnFI7d8uRXg6yVJ0Jw2oS\n0a4hKhVrph/fgheiVbmufioA2qZv+kO8eCpd0fREBRwzj5dnsQNUw1qzD46x\nMdileVsy6zSFtQkkcw8ou4lW0beoO/tFFxhIIGb/nnBWL1TR+6FfIDEz7kao\nKSj6Ag2CDrqR/m/VUFcA4o4FY65KWdxhmdU9vVQWyDs+wadIHdLUeBf5at2N\nxqkFpvWd8x1DB004E6BlefQ3GL/kZ9ZvqcB3pQGWViBa67FSn8u2kJ18IZji\nGf/GTsp9FPURiqC23KpVL0Wg7tClRe1RU7qguMT4MKauSwQDz03/RgVQYB5P\njV0uI9NT5aL2zVlDltMZPLA2boMT4N1QxsPIoUDT2jYg/uxiw7yY6KM/8z1D\nsjtiBKbu9075q83DudAakXtlgn0++fp9GleBsHabMFyN9wyAAO6kYmVuGGjZ\nGdQP\r\n=/DXr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.0.1-beta.3_1602243274966_0.170410743695822","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@financial-times/ads-partner-content","version":"0.0.2","_id":"@financial-times/ads-partner-content@0.0.2","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"bbd1f092c4f4f62c74c26b04a05b85e9f8498d8c","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.0.2.tgz","fileCount":36,"integrity":"sha512-dHZKpKZE144rYE5MV0TaCJstm2/XZVlYU1j0yZIgJazIEQZncBehU94FHaibUE8gQyZmhoUvIIiD0eEtNl7npQ==","signatures":[{"sig":"MEQCIDY77zEoziwV2LIHYii+/FzoiqHVb+2qhIy+5jU1vvgMAiBoxeBKxorXzdQ/DT78AUYBuK75y66ZoG26FI4dZnjP+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgG4lCRA9TVsSAnZWagAA4wAP/1+c2prZelDnuLypR5n3\nyBk8XdhbYLgbALOco6eNot/35GQ78Z8VTCg5ThUPRNEaMue6BDjplpJR/jPr\nXmCbPfeRFDj3P6mIbpweVa3AjK/ec8mWOWuok0Gj2zsKkTr4hWTCZ4iDY7yO\n4OHzy1VcOy2mcY+ydGlZK6tWQSVwMnnJPkhhOT7A0vp1MSZQ0Dr59wuyYX58\n3eycgGewc2Z28hWk2/iooCly5LdfXrB48CJ2pR94ptq6AV1LnnCiNoBNBXOA\n/wZSGTemxHV/0neGygpgho+3COO7UMrozHjxsY0297G7ozTnbTg+GMYZVHpt\nb6j00b0YQ6A+qD4AxAx+FJETxHIgCNkkCBVnwWuGnGyrhq8caZ0CT3QRO7r3\nd2LN0Ofs75lmJrMybFkzbp8LQn0pZumktDcyEVYqgU7O7gcRPBuAxgPcyXWX\nqftgQWttNjF+E1ajdVPh6J0y3T7BPNGNP63golv73mIOV22zAGqDecKOAQm+\nW3N6uGvZXiks+cUeZv4h8VPXwZ8KSpzdgRxB2864qtEtamtMryAzES6tWpMI\nAZNRajtYKFOlnkPc0GnvB99Un2WQBy9ous0t+MpEKeMyqbOUSrA9txccjOhh\nx2BDvXvQdMqgxYOBww5bOvk8SCsU+MSH8YDiUmABwlDspsgtvn+9aqG2sGar\nkS74\r\n=Zqjk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.8","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.16.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.0.2_1602252325392_0.3693629713205884","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@financial-times/ads-partner-content","version":"0.0.3","_id":"@financial-times/ads-partner-content@0.0.3","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"630fc07af11496a5dc561529d9ee4545bcbb6938","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.0.3.tgz","fileCount":36,"integrity":"sha512-YxLJsKpvo2S+9beuS57N9L6eeG+qYPSM/bFHnA90YNpTsQNCbTf/QYuijDuzKsdJCxe+g+0Vg7q83S1JvsOuPQ==","signatures":[{"sig":"MEUCICKrhJCtONRkvMyB6AvH8teX9K9+rYfRLC47p6wr3wrqAiEAxyF5KHSf0+20BGVuoqVYOZMydZxOBN0oNAVTIniDOIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgHDLCRA9TVsSAnZWagAA1iAP/jw771ywNgjpQpv99g4I\nnoGcC5ga0SG4yXH1kcNW5sJkVxRRgaU1pZ0wqbfmX1C53z97EUMuSMmkJUt7\ncrl6TEgOyMIVjuH2JymyeELmQQ3r84ihDsAUFAKgx+IWewRgQjnuv6pGzGzy\n/6KslWU14GvaZvJz8ZIi4P3kfAjCHbdaG5BDscfdNg5sChX2oRA9v+wh8Z4E\nb0FpoPgG45eGA21egFqehDfTNwgaF8v7hj7kKWqPoTaBJ2/eS2bvJG680h2N\nVrqNvKSIBhxSnTY9IHXQXhtwov8DXtoW2WeT+wXwFSArFZ795BOyJsU1T8UX\n/lmUQkIwMciLwDnrqGDJa+5Es23EexJfEYIyVQGc5oPXMyiMFIaao5gZnh2y\nuwU0SZ3DZGF6PxlrPa779ByjCGe0SORquotJvbjvTn0KgvPsT9nJl2MzoRnR\nE6nv39GGuugTMRkW/haq+z/rcEiREpgMMAfUEGXBKIKHn7vtsLe2DR+K+kbw\nx5F22sdUpmPtZZXslMSpWKwVkLRuna0HrMdBhu+cZ9Pp2WcWv7MiGiuBJthu\nb958wFQHKQLYkshm7X3n9WLFkp3DX5KKE9kZYAvmeachjbKk25maTnsVwlVM\nWnQmxZXPnRixlrcuABMDHw7xA3eG0mIiH6e0typxn4aeVl4Opf85VXasx+cG\ntgdH\r\n=kRYr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.0.3_1602253002721_0.8375767142934079","host":"s3://npm-registry-packages"}},"0.0.4-beta.1":{"name":"@financial-times/ads-partner-content","version":"0.0.4-beta.1","_id":"@financial-times/ads-partner-content@0.0.4-beta.1","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"d44c6bc152f19961e5822854f8ebf9003d8c8658","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.0.4-beta.1.tgz","fileCount":36,"integrity":"sha512-iSncuuQjvykYj29LHOmfzCFLsYWP0QtU84SCG/cd2BZMXxmT8xxzblRnmVYKF9o7I1pLYksfALZkCUpZ/JscmA==","signatures":[{"sig":"MEYCIQC6AfHGACIIGQQaCLSJeuCL9e8JhodnGe48MMFNOpk57gIhAJvKQmcaLpwFc+VlwhO8n+4PI8xcp1KKgzZ5qQ9Nq067","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhZaNCRA9TVsSAnZWagAAnCkP/1odkrD0B46EiCI93H+f\n7MI4190xNFr9LDNNxSA0MtEnQIg/IGG8yRnD6Cgxe4sWAWOfg6mCCJQl8iLm\n6SZu+Apg+h8Pw0o+zq7hNvSKOJbKnog3O0r90VWMQOjDMVY6joUsGkW19qrr\noU2E/0W0uf5v8CTfi/lKpUbwOPwKzeklFRyn3esGwPAzqzBCjQt5ezrqCwIf\noJYl35DUyp4++cY/bJ9D2emlCrtN68xNBIkU1DWIRQ9H+xW++aP519q6kHcs\nc6F8RruP9TdVXJlXtl76M2F/VMbPKDBu+ZA939KihqYHRMZxayEvhk0/FY4F\n7xxr5ERHd/t7JBtVXPwTY+oaSjKWX6aJXrOEnmIWm2Tr8fhpK/926H1wqIgw\nHfR4ReR/rPX8bEhVYCAfLi7jMvf2YUx4ahoGfZY1bKQFo1BBcTI5fek6t2n8\nO9UbI6isWa4fPUzI1VFNCpTiKkYSXkzKkseexyJp3kD7AZckswa9jPFR4QU0\nw80TNIt+Dj3HUgOG6cKPvlRS8ghCHUp7GmI1+uSX/QajBZf3AjBRTQEHLqvu\nf41z1Zu4/Uge1qAz2MfTVgJmIAA5mVdWlTSWSZ7zuiRyOk0xmEdY3cjClpzV\nBMKcXfeiupJlaTiNICRB1jC/9h9PUksMVnPZafJTfRDhLd2+cJfYPGHHP8jp\noihq\r\n=zqnX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.8","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"14.11.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.0.4-beta.1_1602590348651_0.2501458281399085","host":"s3://npm-registry-packages"}},"0.0.4-beta.2":{"name":"@financial-times/ads-partner-content","version":"0.0.4-beta.2","_id":"@financial-times/ads-partner-content@0.0.4-beta.2","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"8bb5ecdb372aeda8b60828fe2ce881fcdab69487","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.0.4-beta.2.tgz","fileCount":36,"integrity":"sha512-UyvorsyCSH6rmPQfOW20DJXvWjz1PudApSd+QLmtqkfaIEpp8gEEFI2eo7PVCDJa1gINtVBYRAuZM6GR9xuO2g==","signatures":[{"sig":"MEYCIQCq9gB2HaykiDqgKAvKQ/KcfF/Q4OldaQuPfLXPDqjIKwIhANOuwEa3pg+yKLzdP6v+vJtN/2ZTa/FScRaBdhxNcyjZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhZeLCRA9TVsSAnZWagAANMAP/ibGP5MAOqgHaG3dcCT3\nAS12xn79pAzb75r01PCOL3pw5zNOBptva5WH6bd+n6J0Z5cduB3hr3tuG4dR\nvSlkSbxIhneqljRe8QM/x0+eFtbc3M8YtPHnwz6nZ6cDGbvALkezdews0VL5\nBUMz93BelFn1xkFN3PrZRG5bGd0DTFejp1kK98xT10CeEeiSrzkGOXwsucIn\nm+1B60MhGxR5GdKNm6YU8MMIU2sDT794dMdcRpKIbto6sTzdDg4gluuqrs8c\nijp04JqT7+AQrKcwlK/mWRYvFVT21TTiP4UtSqud4qqusCYiBcKzFwZWImw7\nzO/O1DhaKG1LCzn6dTWGZBlqs8qqxMjBQRyb1z0OxdMouusOf9v7yMTi9Lx7\nzfhKSVNnQfp5Fp1aOq8SfDOmuaxY4FubSv3JXCcJacabQGlrbM/ibUc6T4Ad\nt56b30gZfy2kN+RzenY6kklF/Nu0yrDlx7Jmfqq3sVjJmMs0uzIoGINUumYe\ncL4Ji90ZpLPJVOA2M3Qz+pWbjiy9vYF03QL+Ra42OPxb5abMANUzVYYlmTPN\nQjfFsTx1E4xbTbwrGXqJyoenDpK+F39pUWa2W5dciUrdKyYtb79Yump6uvHq\nNowksiToqVj+1PcMFF8t3jS7HLQMoIAqhKDPouxRDDVwHdkcoQJMoApIxXGH\nmDBM\r\n=R+N5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.0.4-beta.2_1602590602786_0.9728759689317015","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@financial-times/ads-partner-content","version":"0.0.4","_id":"@financial-times/ads-partner-content@0.0.4","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"34a88cb1875c7c0f904e40c0e9e026026152164d","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.0.4.tgz","fileCount":36,"integrity":"sha512-+Opft6uXgal7zCRlnbbzqfNSTIlUdRAAuhrqwEBtxVDoZF6izFIgxJKceI74X62mc1aoO+1PQr+oPNafahu7Vw==","signatures":[{"sig":"MEYCIQDkxJUzfzbQYSO/z9l4gzz/k1Q88jfv0E4TIUE/05FfRQIhAMi00uDaDVVYwRhsuPZ9/PtUz4qhRpyErI2Te9Sws9JD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiCgeCRA9TVsSAnZWagAA+Y4P/ivYEoP/Bd9sHRIGNkUl\nul91D1lGmgBaLNNLaQzWG/Mvbfvlz5UiE/zhZto1TAAc41/e0kW/PAoadAql\nJKV7HYcUW3JyBkb07uzYzAP+qciLiBDqwz+kdYmzQWz7918jNn8CQSrdNE72\ng4M3vQ6EMi1WOHCiOy/jcQBTitsml/3X1uqEgjqi35eYORuYmAX9arBdVdS6\nUZewAGKg/daoxg6VmCXitJuL6C93oC/G0++gO9ywKucwFxtv6Hzg75RNIdKe\ngRA31yzQsIlwANbrjeln/dMQCltigRj14EE7A94QlmrOpQK0KI+uoAJ7bS2P\niYrogUvHi0cgzrSgbdDTyF1bBCq7ASwaPXwLPW6KMFiWVVQsh2bYp4fHy5DG\nC2SpWvUxbBwzOcsRTUZUJeD7Yp8Dz2dWNtsAwb27e9Gg6ygPkWlwzTMPfi89\njCbYh4T0S5A66x2iSu4uMQk0o89FZMP29ovP9jV4gdUTSxsrFGZj1057X8iB\nrrU3A37xrFWk7kUI7hFm6dg2KbYTLSCnR9zAphQtF6RLjiPp1rrS7X4fMzOh\nubYoyzN8SEqNQ1voy0dv1Job8U/OiTtlcBVps0UOShYNTkVw/YZrwpUePTWp\nOliGR5G6cG2pNCRaUKxxCL4Gvfhmooywy4CaZzVI1k9ObNM3tOmZQvK+U72z\nf1fN\r\n=j/nD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.0.4_1602758685429_0.837045166072848","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@financial-times/ads-partner-content","version":"0.1.0","_id":"@financial-times/ads-partner-content@0.1.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"e9a76621f1ab6955feda00490f8a83d01f98e2b7","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.1.0.tgz","fileCount":36,"integrity":"sha512-nQmESHBYV+P8iXuiO73uvtxphKd8IqmUvLvreWWBFhYftJh8ijT59WFwTGsQ9I3tvJVYo9JO6Bi35+v3WnyYfQ==","signatures":[{"sig":"MEUCIHZNWIJll5L0UJy4cdEgZXSWIM/ALVqXFiSbirlNx4w+AiEA7GXb4eZ+Eammzh9h7ZmQq09c1p1VDQlCq4HOtaSe+Ug=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkYf2CRA9TVsSAnZWagAAqT8P/j3aMpXJtsC7lvxJW/aX\nx5mJv+ZOHst64MuGu3iFbXf84CisORnhsXRMgWxRnuyXgV2+JyczrrHywyQt\n1aQkSqVAHC6ZvhbdvEemgT0NtraUBoLux2YoZYs6Jihq8GwpOr90ttu/9Uwx\n8Qg8FUDnAk79Nuj3QQanS1aW1aY2ee/ONdm/HZWrffb0oDS/espVT2MTBw9k\nrB0TTc4B9HJOea4o4/y7ArMXFyzDzxl5PRw6N+fQM0iIVAtMEWhY1s9tGH6H\nsFWzGVeIHzTcfYzFzSaIHHb9+ExfY/vF7Wcp70BFLVTzQ1rpzTO3pJTpt8yJ\ndHgdNpYbkwH5vfj1J5UAj6+E7t3hu+60al4PFDM+reH8by9Tp+abvHmJAlYc\n9ajvJBP0LS5sapPrAppxMDKC8WjHcMN2uPkv3pTdJZ5Kl4SaPRCtId+X7zmQ\n0vxntS0b5r7RMNW1JFr/TPcn2iBERVBF8CWe7ptDy1qBlw7BZUR/nWgWa+dV\nCRn2Jhn89SRL2I+kfXcvrc4jnTd0qFLyBrcFkQhYNaT5+jDtMPA1SndRpUSR\nAJioLhmlh6gHslBlRYNzKH/U/idN9DRflUAfI3tM0uigY+FufOUWdqy1FkhR\nCAve1ptATM+ZPxG1eoNCxh5HmW6YmqndHgvMYPn/c6OqMWCqh4L0IOjmK+gE\nZteC\r\n=Ek7p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.1.0_1603373046045_0.46904716699039173","host":"s3://npm-registry-packages"}},"0.2.0-beta.1":{"name":"@financial-times/ads-partner-content","version":"0.2.0-beta.1","_id":"@financial-times/ads-partner-content@0.2.0-beta.1","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"667e2e21e558ff7acccb27d85e267d8a7e487a27","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.2.0-beta.1.tgz","fileCount":36,"integrity":"sha512-ticIhTonvycD+fxEMWgLmVJd+/Fo7lfFunOZGzphhhqrHbWEckmGpLdUdButyAGNIBJwYafN0fMmtMifVXI2ng==","signatures":[{"sig":"MEUCIF9a1OVaEgV/xnMNEPAkKBVm+4gLa5iOdjBpReBChyVWAiEAzTo5I8zz2qYCs7o9NavfzILYeQRsV6aA3mCyzRpEIlI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkayeCRA9TVsSAnZWagAAnk8P/iLeOCtTyl3m+JDJtsJT\nj0BuCA9mxqvUnbf3E/zUWOS3NKTIuPq2Ap+mwN85oDz14S+EpBqiGDDeieJv\nfWCCSrctqt7IxppX4RSOG+929QyZANku3FAxUby7oJSzCerKsYobR9QYrJrL\nDsvER1OIX82EmBLuwMFBh4wX+Dir0APatQ29UESKBJDS7UtE3FwIqX83c+F8\nlyRtxx4vNSNL8GuHnJKxeJoUWWK2nT57mKDOHIntcgpvJ+Iu9E6FUXVQX5gQ\nxXRg/BHKkKuD5Dn81uqAU/Yxaq9jtyJ2ycB1E80T0gV1FBdwZta150cMzHH7\n3qOriuq/e0KaQMmyU5l3lIvfOaB2MWNJe3A4NRUNhmouMOm7Ddkq5TUZaMxg\ngKOFHsWkcoXYvyg+gCW1C8z77CzBm/tLDTtrhTk0e7v4O2+8g+TE14WUzyw8\nSjXuzsnpdGQxOlfyjhS+kVfWF8DFzduyAk3tjSJMH9R6D18bYgVVSuENqQRV\nMCYdlOvBbdn820J0wXqi/Q3ZT/e8dFHr0yE8hC6cIaZYcwgwkwEVRw7NS6yz\nx74HGL8Q+pEwDfWA1Uj4nMd7AtNFOtcuMS6ZQ8UgDbSnH1FTieI4E1wpeoYE\nCJinEcix7pw+RxKn7+JclT4vrP1VGN+b9e8bCKsUfQZccsEon8OsVat4EPDB\nyQ3j\r\n=Ac0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.8","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.16.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.0.0","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.2.0-beta.1_1603382429488_0.7929919516214428","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@financial-times/ads-partner-content","version":"0.2.0","_id":"@financial-times/ads-partner-content@0.2.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"515a5e2d8a8ea4e5028304daa3a31e687203a6f6","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.2.0.tgz","fileCount":40,"integrity":"sha512-XIrdLph57KUMuLbPcL1mqO/nJ+cjE1jxf+5W7v1rD2IArQRUnZJR5ftbqw0K2RRVapZ296pr4DrWxfNifXItjw==","signatures":[{"sig":"MEUCICIG7+JsAWYBiEpLEGiGzt3m4hsDMDKxIV8sFkJHckEZAiEAzDREXwoNgSpwU4TpLhgcHMkbYFyTY3O8cvOKrecK+RI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkseXCRA9TVsSAnZWagAAlrgP/2+1oiT/2Mvc4K2APDYX\nDChRzei6m/csLxut2IFO50y8PpjwxWXby8J0n2jGkkAPioY2bjRnYs9Zqa8s\navA3hMN7fqU1/8WD35bv/U1LmTfZcOPbBXuf0f+CQP4bt1GTdnM7iWXWNgvy\nJRZ0JNFehCsNwRWUQgKNU4EHV3Wkvn1dosBjme2wvZwVFx3JdNoSmft5NCav\nsAh9FhNfEyBQjGwEX9fS7cu+wbkhmJJy++1JpUfuoMNWsx560lSBWQVkQA+b\nRoZQIVS+U1WgDU0J7WKtGYxzTpS1tZZVKpltzJeEVBndMmi5N3K1nkRM4THE\nC7D7moNSxh5Zp13DaECNAORkzhjDgWpMkXp1hHCdliEkDzxpk8F6O4XcvHud\nZOi3YlW7KVVhV00Fcqa8sX4lz4fMNXPp6GzBySvheI0+SVwAlBeWJXV4lh5Z\nWqB4BHajVaPfaFZZe5KIgk7E68VYSQNHJKhl0CQIoo9l2nmaCmJWNrjTJ4wH\n4Lt29ax63jDIe9p6OfP2GyW895zb7L2rw/D5dAeKCFvV+uqbE9Wx0hyEJrs2\nmk4vQ3S81hU1c0YU+e6u9oFpQkBC1xLY49Fxh9GYOySduZuYKzTtVJ84f70n\nn/DWKEPdiO0vyRFF9GU219ko8qlwAER2q9g2ceFk3SzqUKL8JKJOxPzKxTP7\nq+ou\r\n=ure7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.2.0_1603454871284_0.779788584305418","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@financial-times/ads-partner-content","version":"0.3.0","_id":"@financial-times/ads-partner-content@0.3.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"dist":{"shasum":"ec9e6880310ab7e750bdc38397c781ccd6f3d53e","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.3.0.tgz","fileCount":40,"integrity":"sha512-1dPTfV5gJ2Rg2XsjtMGO75UmQoyo+ZI4ocvT+VRRtivfY+vvuBRzklUMNXTlCbUolQSk08vD8110a4sCmfhY4g==","signatures":[{"sig":"MEQCIHUROkFjqMIaQf6nxOUkJXfbSDjvKVllJ2fvjOVyJRPKAiAstiAAH2OnKD1lsLEsq0HcUApMoMJqv8k/Yb6fCym0yA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflrciCRA9TVsSAnZWagAAa5QP/1Vi8QoIZdUs5AHXLQk+\nIGyCzlJUjo8PAjwlCuqT0d926xkd4aPaDF85/L0eZ6EoWqEsIsrjg4jzkK/5\nocU49VIWfbtWOThctpiS6fTDLF0pS4qNxFfLjI/GvmWJxj4V+tYMB6NmPLKm\n9QXV1Di7Ju9DORhge/xF1jZZqORFYBM3WY22tMsHymRqVPXrnA21LmbKLgTh\nKpInf3TGzq1J2HHx1i7fh9bMoJJEGdXQdZSqlK47uwsHDbu52nYYQXNOBbLo\nhIGzBlizHIp9GVZlhS1HyrokO925BFIcvxiOTCUiBewAMywbSJjUcea8WjEO\n/H5930WQpyXQUkBNmlt11ghteYUV2uGIbSwcLF81icdZoIu+evVVeGdlf1A/\nG5ErLllBqSasDUEwOt3N9QMLDYrW7SlcHySgn5RdDLCFz5N8hdxcicBFB1QF\nMClYwOKpZW0l5GqzY3ogd0qJf8gBWer5cCxAbsNQysfNyhInvgbphmnpMODE\nX6ifAJKcw8GBOAA9mvUL6NIcOMfR9AyfwY9yQvd2IQz8AZ/V21b3FZ/7so3Z\nIa8mW1AHZIY4NcvjoGLxG8lMiVbbJ4qguhxSewy+2CJPB9KV31t/H2CXa0Fi\nvPtwhKtqpuirBHIAIeHnwGEK5YZY/UgQLYaYFmFi9Ly71c3z/rHEe9C9brRx\nCNO9\r\n=PuTl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.3.0_1603712801932_0.6353215873402893","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"@financial-times/ads-partner-content","version":"0.3.1","_id":"@financial-times/ads-partner-content@0.3.1","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"5d9b5ece6e4bcdb05270e9f1374c163e22cec82e","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.3.1.tgz","fileCount":40,"integrity":"sha512-uR1auAox3oNfR0+tktOBlRELQOZD/icEmoSlgATQR/qvpP7E1Crnpqg19nIB/PO3LhgFZebcQOFPNl7SaAF5Sg==","signatures":[{"sig":"MEYCIQCdh+6kLW1kngqlPAJeVOKaV+/eDhgyUrI8p0AJ6e7gbwIhAMcOmmqevQ6V3M/GSwkzG1yk6g7n4tye/hsft6MjZzfU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl+sZCRA9TVsSAnZWagAAn4kP+wWj6aFOWV3fNqcg5gr+\nj/EPwy7rQ0hTM938oxSLveMrGNtsNDJHqiLHaWQwQto839zgPuRTa921I11s\n0AAYA8glqDHfGecvpKO/ks+ZT20xLjL4dZ5E6OjzOOurVi/iCsUM7lJrsFbh\n2tYenbv1cToeA6Zm8rrEWo5AxMVR+GeYIT0+sinudc95yTj9NvSB4gYTSHdU\nlGdebGlt8nbbMvVgi7Lh6Fkv+oRAgITq6eclJMNieHhQNNQZR6uZcGNi1sZY\nESpzWYsWbzAPb3z3y1gXNWfMt74LFdrt3VC9+yBF2MjJLOIUydiA1x1R6nVU\nPC0BG2jC5ZBfe7fyXV7nvE2bQHonESb3nv7w+6/MvRDb/Tw4CVlTOyaQTkoa\nutRU6qhrX8mmBn3rv9qy1RHZG6Pue1nFODgoA5RDGlGhpMDaiPLLcFtXjgwe\nWDd3KE+M0G8OS6VTt35BOZqMItOSgzitjRuQpURRIQUOneCTFBAPMMdk/+wQ\nBukgXaZcqNTCBqr5h6boHCbnkBtIizxQ9m+I9W+zWnd6XKWsERwK1/zq85PQ\nL9UbVq0GeQxB1Zuo144Q2IkGLcyiLrXmq4BluCoyotIjVV4c65BSlspsfApn\nLfPD/a5XAfAfAHwANT90WUEfx/ciGOZuwbd6WpX0zTuclNnBQeIEe4ViKC9/\ntcIS\r\n=ye2p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.3.1_1603791640971_0.11110531992621797","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"@financial-times/ads-partner-content","version":"0.4.0","_id":"@financial-times/ads-partner-content@0.4.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"1c0e7d4e7c49cecb8c88684be19b602ecf6ba473","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.4.0.tgz","fileCount":40,"integrity":"sha512-E3zR30+bOQz0n3Twc/9bB+GltJKwlYWXzo/XYpcGqY4LsVCvz9/sgZyov37R9OyKBSikn0QxzHnRlgrE808qSw==","signatures":[{"sig":"MEUCIQCMkU7xKUtb95W42+aDa43wW4efN/EEtHgNR8SWba3l1wIga0cV+wfo4dWownsFSQOCfseJenl0umR0hxxC9QSPkWw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrmBLCRA9TVsSAnZWagAAGMMP/RF0c5ZObxx2YxpY9Tut\nZ7ZhikEiOXzgRgnYsgHc/GHgs7TdkkdN9ShhPSyO/8vCNNRtO7cCQChYuXKL\n3QZztUsRgoHupwzFYyAA1Kg/IpNFZqLAqWgu+/smU3ktUA8RPe5mZY7/qzyY\nMCsVqFV1vtxAzzgtVdJ+LZPfWVpvft9VBT4Vr2K46ptgs1zThsN3nKn9WuOe\n9jZa+sbe1yVPAc5aW10EzYd9uXi3bp5HWjb1ma9/dEA1cj2jtvuPz4/fT54c\n8KIJR2mtZ2pZ6FC/w8NtkEZ1taj0Dk4dKB/3T52bofKDb5OPrCs7Z/uWOkxv\nL1X4DWF0ugRzxgvElJXgtm/ZRfXfOC2DqYM2Zk3c9XcSi+d5HDnr5dkAdDaN\nEIb0ctCtGutVLULJSxlMUgjvNVy/UVOL9YBxtvpw1gaarHt5v1ip1bR2384s\nsaIjQoPtXWJqU/hBJ9yPwMvVcwKn2/R2KJowHg4jXl2yAqY6/xK/YsXb7RZP\nE1eiCGdcEIrPRjPahMKRqMnrkLGx8+EY2XTu3NVoZjzG4cjfMp//K9e0sr5l\nqpchUVy7dKud5XjM6fpboEFz4u6cCF76CGzasloJzn+kw/kt1TKVAQScr3yU\n5SHRUsZIlBPIAc51Mvbu4lixlD5qN45nwEqlxh2rSZvmgRavjLAyJboNBv9c\npf4i\r\n=w0yd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.4.0_1605263435358_0.718796508289794","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"@financial-times/ads-partner-content","version":"0.4.1","_id":"@financial-times/ads-partner-content@0.4.1","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"df866cd2e98fb8ec06abab65eb2cc5c8eb762969","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.4.1.tgz","fileCount":40,"integrity":"sha512-SLZQmP4WsbNemeco7U6AP7F1KDBtKk1BZpShimIpBW3164969lshn+nzZiRJUDOYIpa2Y5wgZ8rPFkv2ph+Lqw==","signatures":[{"sig":"MEYCIQC2XveCyO54jghKmFUrNYBMr/QAOPIzQDb80G7O46DuigIhAIkYjT58Fp21+TlAa7uzN4JwDuOQczFx9/BergPADXFi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu/ntCRA9TVsSAnZWagAAl/sP/0XpEHmG8njg6IGyyAGm\nQ2G+j2DtD+GplpJ9tBwkwzaExagYRc55tyTYRHBx1d0VmQzuxcdOKABurFpy\nnX4BSacZU5xrghU2ase+Ae5kDJbMBNom9NK2mw3+i7pRbMcHUn0n3rR6y9nb\nnGD1sAXHWezsGT9GpgsyV8iz/irM+8fWxJtZqBCutLpWa6FE0BjJ7gIJGXg6\nZzl58fLi0IdAyMrg//i6qtBbVgZCToYjSZlw7AKSXKxanB0Fo+RX7c5IUUk9\nmFJPoogu9+G7Z17VXz74dvv3MGtsEd30iIrJIo1Mp8HMJSNt9BNxeDwXBpjV\nadV55WPj4MWsEY2UwIDWWNtB8H1pMuzj7NIr6HpXEjbB31rHjRoqYPVphNqV\ncv7Kanx1a5/a6ThL8nkhgRXinkUNFg3Yf5l4pUFnraK3pu2+DIhVBiQ1dQ+M\nfHGiEJWLtfrCFCdmA8njhLsUCtwZK/919t4Jyovmz7QGLmgCK9EFy1DoqdnE\nr/EGC17RDlKyTRDnkcoulBVWQzyI2Uv/tFiIehJvufmPpwyPI/rp03dKiqUY\n77CqoFvDWWr8bipRhLl975gmRrmmC772nFCsoJxogVTI03NPOqNdb8AUEPOF\nC6AnFJtdau2PvYgBAI/3gKQeC8K/AWSe+cN3fJapGohuJze7RUfeP58JBHAt\nKs2B\r\n=y0Y2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.4.1_1606154732469_0.8857756746736312","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"@financial-times/ads-partner-content","version":"0.5.0","_id":"@financial-times/ads-partner-content@0.5.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"a8f1ecd10599ed5b0a32f8a16494664744a27a32","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.5.0.tgz","fileCount":40,"integrity":"sha512-JautDYBWCKymjpmqaOD1uLIgv8SyCsY35GS/3c4eikKtMLW08tPRv5vfOEf5dD0tBtaLoM3sYNRl8QfJ//naRw==","signatures":[{"sig":"MEYCIQCVgb0muqKk+6FDNBfqvUHkDagNOj92hkNv/KNTQF6miwIhAJ0nocLSm6fnSupTceljloTwh880SSHAcr+mTEKpZaYh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvQQkCRA9TVsSAnZWagAA1f0QAIH4O5HgqqKeTp6Bl8O8\nTfnKjURbUAXUFHwCASfIPr8uQ5oOQrYJXmvP237tQbHiXlm3b7jcAdesY2G2\nuN1I5MuKPtiuhlMKgWYcdQcq8ikMFSKYEgNNdfx9+SHYNQiHZnKPoJ0Oh71f\nK8+7PxYHFWLrbZAcPT3h43nNDtMKTFD0W1M5TSRvEZ9DLNU8yzGLK5UuYTqn\nLX+W3wySNBc+UmbNBD8E2Sa7rogwwfCmjiZduUsSqSnsBB/43rXnSSstpwLj\n3hXbtQQv4ORZfG1za8fdHn6hWpNEcHOHwUJMIHxLFJVg+gelpZb6mNNai2A6\n9F/D3nK3AWLN0ewsjpb3E49FBXSj4HPj5Ax5/31rjF0OiAdq2soHUherbhsf\ndCKXhkym8w0y/2Xol7yW4MBIrKIsSieU71vmvyF9HPC1/Z9Cic535OQK6CzL\nTwU++o/21mFu3klFL24FVzYCY+BhXB339WKOlTtFQquSpS8nkH1aD1u7dqmR\nBDwQZ2lCx5Y05Zhx63abW2AQoaby80VY7WTBRNfxWt5tSg1gqkAMkfKdIjb2\nMmOXCVa+ECJIudDACuNVItrKRUgd5GXesQBFb5DvisiMnokfRmCnXM8LKdX3\nKmvhtpoFnle5y8Iih0EAMUkgk/UM5fVPShgoSU0fJ/EQ3VZ0BKj+TkvmmsSG\n1qge\r\n=KPKq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.5.0_1606222884336_0.6275975393407847","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@financial-times/ads-partner-content","version":"0.5.1","_id":"@financial-times/ads-partner-content@0.5.1","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"58198e0cf5791a5444b80b3a4251ee169b80790a","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.5.1.tgz","fileCount":40,"integrity":"sha512-fway0tyZpmp+hbjCAFSFtbP5MhYkjpH/pK1yCLioUC03RbAubpMPnfsa5sE7ieOcAUQInNjuHLscQxSIjkgJnQ==","signatures":[{"sig":"MEYCIQCXaTYx0c8V8FEG6PkkInk8wFlPhos78KgcqqpNs6RkGwIhAKQ+iuUJFdHuncQVPJyURIktvNrwTxVL2aTqDbhXFp6w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxPS3CRA9TVsSAnZWagAA+gUP/AuT8cRSeTJF2TDpIhkC\n1EkkAGMAORa0JkinMGrf6mrkyAEvmmv8DnuInyYEewYERCN3Vh2EydeUFL6H\nuJf4HCktmNdFXbaCqoo5j3Zj2yHjvgRkxr5hu59gvBUBcU08JlYdqTt0n81/\nuJ69qz/fSDZC4g1uarGmlk5jxXHsYJvC0GseUOw+3jyB6bTrUqNZUCdmzqyc\nt51+zdZTxtzWsj0B+ZlPQSDt7HMQs0TqFaLghYigJu00n3bxMsJDfJEK9XGE\n3/Fu3VZ16iEj9f3WE+oS0ZtDf3S5Itlhvktv79BVznbvtoM7nkXFfUt2/GNc\no8wjexpAueTR5wXsm9zqwi6BgGKMqbPfhGCPcBYdMBX+0QH+NLmBEiIX59ih\ncku5Eyub1eRMCTQlnl+FgquassZhdpuTnvZPUI9lrDCoVY0Nc8QLHEZqVA+i\nY60rYL/PZKZqdvJDwH5HcXHLMGF+UMVfaHk9eMavC0UeuGnoFwBEVcntsZTD\nuu8E9aSF24XT7KTfMnmQjOJUlnOpuh2E7waqDc7sBbCyJEVi25axhxsYjg0I\nXw0rBBNzR3aH2hU1ZXlNLgco1QZDK+z3j2cdPnuAdJ1DxOayuS/4emOVrYnn\n3zLLZkfKEyZA7I6E4sKTkcPo/nvevtdAtw9ygWimOsGu0tLIY3GdvbCjvh3w\naMpo\r\n=IwCW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.5.1_1606743222792_0.05634736055985545","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"@financial-times/ads-partner-content","version":"0.5.2","_id":"@financial-times/ads-partner-content@0.5.2","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"e4a0a7f9fb93e8484c5acb516b515f50620fb3ca","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-0.5.2.tgz","fileCount":40,"integrity":"sha512-MqJ3EbP1j7r7vTq5BgBLeKEkaTpD1km7uapL26nhlr2wLYZGf1KVw2lswQ7h1GUCv/DoKorlYsgqzrC60SUF4A==","signatures":[{"sig":"MEUCICkHv12+VJUWX5wT/mKTSCwpgj+/Lry70bc5qD9YJuWFAiEAm9fBhh3XlsOYLmziVI3v0JXEcoAYqdwUN1vw5M0iOuw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyQIuCRA9TVsSAnZWagAADvgP/2sYi7Cimnn+4VjXtrIp\n2C4UjY7aABiTYHSMje9MbY8fzkag/JqUkUWj6Cf1tEDR4jvuN19HpQrjJW4l\n19cYJkvJ8YDs3aHieE4j2e/kq5jqU5pRPTMXJM0+1Rlc6BbYUl4BVxckU5QX\nWFlv6omj9rGB6xAzgngtfo98rxZJBzsmdqY0LoXGG70XgsENfXl2Vlja/9xh\nMx+amb6AcYgTPKdynV4VDBWgI+NJjg1HZrcH2ofkwtj6w42PJHq860AS0JQX\nScmANhq9exOrXeVJbSOGumL6otXfCRIdLA0PFilql5xMdrF7WmdXwvNw/Qn3\njJjcTmXl4f2t6YkT4Dn1zbdDq7VQ+nDLuo8DmY0NhWraGpqTuB2rL/EMGVoa\nnWeUkhX36zVzIIU2xvGT1rKz51UhjccXwx7vGljuPZuqi1JveMDHkiLFFVrK\n0WDPFGuDvnHRhB98PVUG3UwkvtbVzsH2Y1KG7mqazwV5HWZRq5GKPf3pIuN7\nmkEHmUou5eUL8KrEM1NpNbZlRoBVfVikZSbPWK4npxP6FbMgG6PwLinnVLOS\nQkva+aImMwaVGUhj60P+FFOrragAaWY/J+JWEjmHFBwWIuCI9opK7V4IcIxx\nLyWwMKvf/K1OBRQ38RzOEGMppiUAO85/OsWIe8Q7NoXMdM//Lrb14pgpho2X\n0TGG\r\n=Rgn/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_0.5.2_1607008814375_0.8664967387500029","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@financial-times/ads-partner-content","version":"1.0.0","_id":"@financial-times/ads-partner-content@1.0.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"a83806e521ad352ca85726af997732eba55f0b3e","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.0.0.tgz","fileCount":40,"integrity":"sha512-hh3cI3i02wEiTyIgoN5Ht3HIx+Py2chNGloizn/bmYi+dL0v2ufPirvoWqwYR7OfZ6Trwjg51jxDyEfLSWKnrw==","signatures":[{"sig":"MEQCIGcwv/KtmT3Vj9DzhmCs1kYMdyowmTDGId12PaFeNLuXAiB8u4KPUAHclFpN30MhGuegrq/YfgEhHEl7OIT23F9cKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyQjnCRA9TVsSAnZWagAA7T0P/RK6NpRc09KxpVVNLFMo\nC5jWzav5fDQX2c0Jc5WIuGxmvc8PIiHn9PY6qsUwJcbVJx1ydHXJjQYQzSHn\nkI3yRmtytJSf5tydnorBjAt3GgmIgpXy9L8NbKLegjRFTE3M4zdT1EUoVCjU\nzGnKY7GHRfgGhuo3M8338RYqoAbEvEZC7QU5qEaiNNsk6LgsmCZis7v7xVqo\nQkxWoBOSseJVnx6ehaJLoYqesYMFMZEiliEtI2oXYZbS6Ch0MXt8D/s4wHDM\nFQZEDR72K0QYlA17F5ZE8aNpDQdUlWZjs21nnEFLOB+wyBHc/RrIrvtSdOlx\n8ANvMZMvQapEEs5pnTYjTiz4FXbUX5rV5pKQQdsDCmazxzM7j4kXIpwTvxQ7\nmQxIMj9pjMAgHTVZfPdKeeNfdfpgo/jsSCXHhGeLlAfkFwDECreKtTHMhOQo\na2aSqhRQ0coIIuig7vQ2b2MQpuaJX8tBjoqfqRNWtLTVavcP42T70H9qbNyJ\nlgfidcXCWngKCMDPxkPhPXE2puZKKpFXxlCm05d3G0HvSvP4kehkt/ZGt4Qa\n86ZfSVzjXz2itoNGGwEQIlXaJYe5iNSiAduk/u+SJYUlLIycuk1Z5MuWoFWX\nMr6PkAJ9Fo77Ude8gcf0ijlHxTIFKPkyia6C/AljF9TFHiAXlCp6OtF9XFVa\nSEsM\r\n=P1gO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.6","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.18.4","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^5.13.1","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-node-resolve":"9.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.0.0_1607010534771_0.12697391242572165","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@financial-times/ads-partner-content","version":"1.1.0","_id":"@financial-times/ads-partner-content@1.1.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"2612660d397e6fff8caf377d992b54d995eeb462","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.1.0.tgz","fileCount":40,"integrity":"sha512-PDv4hY5BkxU0dS0PTYR/CPlhefkPSwmFDsfdsvwfwHDRvLuOPW14XBZetGZJdjXx9+vozwxxX2kH5Pf1a8TkdA==","signatures":[{"sig":"MEQCICRUx335DBP+U5vI/Qq+fC3ourinK+4rEyKP67E1viomAiBFaZYxMQ1P+opousIODsm0RPPzsbd5D0KNbM+GIEX2bw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfykutCRA9TVsSAnZWagAAdoQP/3+jbjkxH5+cD2YI3xmB\nyXSP9eVq4dJDCGbpbVR9+Pwi+eyWtUnHdCAcfMnPaka4nT/go4Pjj4odzz9S\n5KJIwQLetIW7rj/CnrKG4ByClGzpzrCS92+XKxAYa3EjgV7TbY/JG3oe3Tly\ngzU18kHOHFGF2Th+Q4zLKNy4odJaGtp69SlB3DilxoYregLtU9K8oTaGEtcx\n/R8sUYnwNXsHTyn+pmg06FpTDZaS/R2ra5EHZBGXE9UvTgaN3AM30DJVL2Nr\noRAoodZ351GzMT1cRs8vKXeNTueKz5rk6UntslKOModzgUlGl+jrTOQuZ6S4\niw3GxIyQ1JFEK+pxOr+BoK1QVpiE3AInEcgBzcuwZeiEj/iC2y9r8lqOpLYH\n8VZQuS40xL6oFnw+qofzmLr+6hWEaM9gFFVBBOcjtEGLRn6X35gJWMZAP1w+\nABrjkk0XXsz4mbB0aHV0FnCZIaX96kAngRlRAU/eOEGORrHIOIToWhbsHLIq\n6kVw8R99bukq7hiog0omKWhJo/LpE0TV71U51y8sTyt7vCWPm+plU/R4lXME\ncrnM7gavsoz4iF6xJrF4/0sK+fujRocxsBJCPe4XnJtSzsNFlJui4mhX9ijA\nOcXY59OWbeOw3cwsVRhdHLuezC8h6DBkOgJsyKylk/mvJctQKcui6j4XtMuk\nyWMK\r\n=69dl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.8","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.1.0_1607093165024_0.4372921909689249","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@financial-times/ads-partner-content","version":"1.2.0","_id":"@financial-times/ads-partner-content@1.2.0","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"e1c845e09a97d2c268b25134787d7d930af1b8e5","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.2.0.tgz","fileCount":40,"integrity":"sha512-0LhhopeyOB0e2QYvKY6mdP7wET/yE9mSrP59YdNKZee4Qg7p9Ewgt2niMGnewOuOxfeBvADIqDSKG8ohGGEo7g==","signatures":[{"sig":"MEUCIFoDQsApyCWnr0Wx3FUJrITZyk4c7AIs8eXejR3xzM+yAiEA0NKlh9U7mcnP1g2MUvpKTdqrSwN4TxM5VGLsdD2ofiA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0kcBCRA9TVsSAnZWagAA/I0P/2p/kfYT8c3o6ZYJfxCb\n5ySRZEz1772kGZCPkBftgizv5s/lNfCiSZj4n6Z6EdOsS8u0Xj708s/CJADy\n/rM68pVoAAuRdsVhAkLTcCGqCqiiUJD5FYuWwKQm9tLzhhFVMfY9rFpHjXm0\nuA9VbNzeawcW/1fvTRFR9QmCxRMZcu1tcDr0MO9EgaCkOZjp5xQtLRG/O5rR\nNIAHn96Z0RQ7xp1SycHNlEMH/SpENMXhgemwamGyEtBBFz5L+0tijVN5Ker5\naNVkthPwhl/3cVQ+HjLPyEs2HODvJb4CSYs1kzrHIMnz+BuOCMoafjQMYY+D\nmgCTGjulEtQB3UqZBq8ZuQ3v0JGzMgmeV/GA9bEP6kGZes5WSxOCmgnW3u92\nahAcg1yIJV9slO+HCNQYLRezlUaMGJSPNHXFjvuT8FcDWY+2fVihwFzK56no\nbZ/nqfuvD61cfRi4MNbAY5V/eyeT6HbpVxIm417C1rD4Jb7dPTfwjyOUx0vu\ni486F1Hm96q1rAqWlSXDo0vftNHjUtNcNlt2xxqkYKpg0+0DRnnq2L1Istby\nGhEJybyJ+mNz01JgxCVnYzJGAqugcRLf/DOOasMz5tYqLWWAMlw2A8JNrkJS\nM/9fvcL/GobNYL8wkJIWvf+lLaRdLy4zB9Yl/KlIR4L87lQtzXYwaKdnQt4h\nWyh9\r\n=/ETO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.8","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.2.0_1607616257249_0.1734106218507414","host":"s3://npm-registry-packages"}},"1.2.1-beta.1":{"name":"@financial-times/ads-partner-content","version":"1.2.1-beta.1","_id":"@financial-times/ads-partner-content@1.2.1-beta.1","maintainers":[{"name":"alexwilson","email":"a@ax.gy"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"chee","email":"chee@snoot.club"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"1d214e07ea3ffe6f940ddcc550dec5d1ce89cc75","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.2.1-beta.1.tgz","fileCount":40,"integrity":"sha512-xB9wzSAKr4uhwz7IrW4kl0Dbfq4h93LDl4CDDDR7xO4JZuBdDLYhhmHlbLHQ350aTMQ4wBwXTB2iWYLO1F8wTA==","signatures":[{"sig":"MEYCIQCnVwJXKFdPEZJLV38Cr4X+Czs4m6lfGilCzY0FJ5ksEgIhAL8R+RUh01o2CWvkPB08Ll7fM+qbq12MtrjEHc7bmJy0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf063TCRA9TVsSAnZWagAAYEwP/0+hZDgiTeOtkVKqJkiu\nSBNhSkdUnsFotCBYqLM0wS87X89ZRlg8xl2HjgtXBXp8O7m+HNR7WkUYEVZ6\nJejOGK1+e2LjdvQwRznz7oIZrvCfEyaS5Xzvxaami65Ul/0gZCveVSnZ7vMh\n788JyVufYcm40qrbP+PC4w1rp9YANuweoKlySVhCKdhOlVhmQ6tGmkANjZZP\nC8xQzE7A7WxDJ1TH/Qz/GBSESeejx7mtYliNIx8Z6wfys7YGuLtaQ5dscHR6\nv5BZyOyW1C124VuIcJ20BGBJMxFQLGZ7EfQH9y0s69JjkOy2sv9BtV8ZawTo\nNxp4iQI8wFnPvki1HeFs91K0ShWT8oOPt0hVkECPJAJaDRkV73kxuyByCAT8\n1wtPZc51xy+ul1vrRt8unYDD+dgmf1+0O72EvwkdFRxDdGFJE72hx6DnPzW1\nEP+q6/ZkQgkeH+2wCf/R4xwgkXoWksia9M9zigaMaQ+fzJb/u3blIAYCnjmh\nDK9J5eteAQLyVBa3xSnysBPDHt01qh32FpCFo3ywbwU1iSiHD338krhoE6jv\nEnA+AExbbBJzlnT13qiIGDGPxvjwkfxpD7cwPw+xhvGs72itSYb7WVKSuRCB\ngsPvmb7lcRyncL4BUs0r2RptD2Bx+FeqAoZDzTnkMhdXY05S8r6hnzrRuVJU\nm9ib\r\n=YnRL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.8","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.2.1-beta.1_1607708115155_0.2703443822441143","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"@financial-times/ads-partner-content","version":"1.2.2","_id":"@financial-times/ads-partner-content@1.2.2","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"5ef4e1077171cb5cea22700a5c3b3986de4a21a4","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.2.2.tgz","fileCount":40,"integrity":"sha512-a6EdqYpJWoOR39Usb+fi85fVk0EWak3wIBaZYwus0Cq091n8B4wXLLItSAQvXZjr4zrM8g9oGEu5gsyK4+myrw==","signatures":[{"sig":"MEQCIGc8rsm6ghJ+SP4c9hl2BFjXR+3XuQThkj+vMUJeXZbHAiA34OgPD7a94VK59+1k4n7T5RJetVHyt17L4CjcW5rpQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9I1KCRA9TVsSAnZWagAAqJIP/2+z3Esrmp3Asi9QtltD\njlczJlObi8VtKkwPcFU7cz5QjI1K4h2uGhgCU1RthLCoBxYQkNVlczN1Rx9J\nExN8oMwZXlzQxv2C7Uzh131uPXn5YPbl4X14fhmC439arrExKbCPJKbRoHlC\nTkCe96lpKIkNGMlexsCqkyFn6oWdKWLu7C++PYh/4Je+zKDiw5+FjJlI/sB9\n2ltFwHeu7Ac5bpeTDbujAXAKcOoxO6Hh3QtGEQ+qsmvesFiwuDGcv5Umm53i\nD5xggCN/313NeO5hkl9xR1HN5YA5ewssW4mvHHorxOim1w2oDYuFWL/oR7kO\n0K+m/5wU84VJZH/kH07j1tslsjU23X4XkncaKFOcTi2S85yBHKLKaDVGbqlQ\nYhnVSIb7YMTJ8sf/bOI4sLvbFXVrbw8QlUnhfSWwBR4AH5DS7tuOdi8A7KpC\nz7vmNPV2d5sK96wauwak+bhoHRbV727pfdoJFNF+E0UHExj5sC++JWOHq8sO\nyai+2ekgCkRUjpPdE7V5WOb4MjjD5h9FbKre3eu2Fx8FiydtvBfnsQHvYZ65\nQeitpDwRJ4EZTixL6VpSjz+FBbC/jsn9qPmZCLl9rwnEydUGzHa9C+b/LWqx\norO+bVHHPSG+KKyJVwEBRkUIH6FNZDVUlwult/Zjd9HrPAFZmlX0wrE//9Zy\n93Uh\r\n=Gv2s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.8","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.2.2_1609862473857_0.848857586079683","host":"s3://npm-registry-packages"}},"1.2.3":{"name":"@financial-times/ads-partner-content","version":"1.2.3","_id":"@financial-times/ads-partner-content@1.2.3","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"6eac423ae7514b21d9ebc4cbbb3983760acdba57","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.2.3.tgz","fileCount":40,"integrity":"sha512-eUySRGZCIiTMcgKteNl24mBhkJPjgAiKAeKq7yjccSFPHQDDNpBpeBi32Otq4T9Z/pmGtN0gW9PrB4fC72JWTA==","signatures":[{"sig":"MEUCIQDSa307tWBgHObMXMD3JDf4DGos/e28sc4C4Byjf8jPzQIgONmG7eWBlMTfw/znk6lg01yygg5UuLA4LquZe4MNVXQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9ZVACRA9TVsSAnZWagAAOxkP/jK01k9yQBtFRUW5kvyc\n25p+0MK8JyjGw10zZkM5n8Suv1I7ndoTu991baUJwnJ0O5jO5X56DzFWZgpx\nh9Efzf+jDQH5U3cuDp2KagHwtJQMhRqmRKTb7ms4tbzi7WCz9jS5h38tXF7r\n4CPp4owQMTgzKbsCgAS+LKdANqjGsRev1XIN2AZWhhV7+A9AWe6hSZVKYfl2\nzV/8iixyLNjv/VVjTQ0pTmMBL/42PWc+BAT8VgSpu3Dszzgv5MaL7Tgms1w8\ns7aiKiJTW34vRJFL2nGa3cvshStJVnOZ0cV7I7MJltYIXdU3nsTaeZN2MecK\nrz79zsM5nUNynSaOmc+TE6Gb57Hpl+1YH6wDMrOceyusST4tnRs/AVTQXDio\nk/mLtBqV4u4FntLXJQByTwz3w4MRHQBaTuAtwpPxGAI+xNnoKbuwisyrBfS7\ndg49OsniO/bOhqCnZRUibF9QdU/pLYJmBmjF8+DsIT3uG6hNfg3Hat7v7hZD\nZc3CSlzJHQmCI7Evn5lb1PYLKFZA0yecPz1dWSrJMWnb0GYa2YOCSeBDD+rv\n1u9YnJc3h3uOl8p2Vsm7NGLIPetBMThDmmDQSxr//uLINC5fFoSUOTRax5p8\nixcfpVZSQ7E/o7gI29KVEsUKKpEExKKT8jv6R9ntsK4c+38/fy9B+cxipu4A\n71rW\r\n=w74a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.2.3_1609930047940_0.12428519724769638","host":"s3://npm-registry-packages"}},"1.3.0-beta.1":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.1","_id":"@financial-times/ads-partner-content@1.3.0-beta.1","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"d59c6b7fe8a0932276b9dcde189323d73a253ce3","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.1.tgz","fileCount":40,"integrity":"sha512-9xdsXaTXn42t0cbxH/x862oHBIPpIxUF8CKtNZgqBYYfNvBttFkJr01pTvSTEBC4WLwOeqSaumEsV/4gn/25xw==","signatures":[{"sig":"MEUCICrQVWg37spcqiQxn+VARrHfqt2X8L+QeoIxFMvzk1oyAiEAyoyistaCpkJ/xlhvL8+GUIChzmwnJs9cdgKPRJBOQRg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9zkuCRA9TVsSAnZWagAABEMP/3IUpSdtJpM0SdB3+Ekh\nhid/ndlQ/S8sWqOoHypgVePZnV4+S9BgrV8v4wYn6SRIP8hbYqjXX7UhPeIB\n3Hjn2i2zSRz0l+676Of+biXD3HmQRvV+UaMvxYJdBqmFtxbKTSth7P9kpTrd\nGARDqtkIZSjO1A/rEX/j64fZVr+Q4WE70pVwvP9fRLjWNarI/7E6EquinupI\nAwTrUgg78q/RU+vKH4iqtXykk6fS8neTqV3dSH751Nt/N4dzQGh3iKrLwoGh\nrkZ7owU1bBjlGk6H94lIIlVp62IFqMhrbZivAAEBFeFScR3XqgDj6ICC6gso\nKeY1rtLeATjC0SlWxBIgMGrD0mwwzRUsVYphzAakTBm9u/L/5r0ZxOc598ja\n7VxeS5V5/p2Wz0RI9ceqEYRHSktkEG0USpBTf5J4gzvgA8nMrPhlMTMT3kCd\n4AHe3vtSx/Hv2Ss/I69wVZgS+7ybaLePlrAadQlIy8WpQnJwUtETt3AwVKTY\nZAvG1IzPWqq4I6Xt5H7DPEbPJDvTY0A+rNBDbCU3xYhn52rTRnNcZvuMGMjj\nti17kxdJS3sHyaPyYc1xEs42y+UBBaJnvEvlx6qFLLmbAPP3dA+9uCSwfd1C\ngTJmIFWDFq8bWhLqEtKNeS7R1PQckVJN6N4/KDN09RKSehgCMyUZiBJZodCd\nbuZL\r\n=X1bM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.1_1610037549849_0.1273122804539215","host":"s3://npm-registry-packages"}},"1.3.0-beta.2":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.2","_id":"@financial-times/ads-partner-content@1.3.0-beta.2","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"b272c15efe4c3d815e852612f887b294348b0dc9","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.2.tgz","fileCount":40,"integrity":"sha512-ijgfRge8AODcmL9DiQNk+VlI8kkuTDhKeSavVHbIF4bsPjyu7NLSvt/kdl6sJoTzdZpvw0nIWtOlHN1Aclnmrg==","signatures":[{"sig":"MEUCIQDLDJR8UEYLI+/zj3QU5GZagVLAJABj4gXaIyxMuDdO8QIgLISnbjPTfrf2T4/9eDz+4AAui6tk5S4fIqS4S0sKUh8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf91b3CRA9TVsSAnZWagAAqAAP/Ruy/QhhUndWtDj0+CIn\nYhKnCJxAo4bu7dbaKe0HtzAcONPaA1qc++KmdURP699kKvQjTtbsEWsgbmtP\nPZ6OF0AkyntPQasfUMPhn3sO3EabxYn8MX8FQp7pVtIJi3QGSVoKzaDx5WxP\ny8ehK+XOqOxOUvdvz0St9UCS3Ea4GCu/6lydsNdivbO2XJNof7QXcI9Pjm6h\n++uHTj7acXBoxisUb5yCkE4akWYnEhp4PTBjrcXWQo7H2kCXlD6oc1L0YIHF\nISeZrldN7TIZhlg2hrnXC3+AH1AEzpuyhLn/FITNGPTK2kjtz3Y7suN1H3Md\nniXfsvGTaBoWgQphssmEX7cW0oPpJNTTEW1d7TphGvpJkesBObCYOvIn8s7l\nbXYKdxtjeU70Dr/R/iM3oU4vKHUVFm4wDCLQTbd8uVYcaLGwGiG/JKI0ipUS\nDq3H5ennri8OuLP9wXVbN6MUzQepl4Ji2ie5XXIp/86+aPGMqyNQCoBAZ4Cs\nUOhur9ZHYzBB6n88GIB7Ktbv257hp6hN4OOA2hcTBdGr0IBnzso1E/x40wCZ\na9DvpTKFuhq8G69tJmz8lEV6ceqKwJEiGKoGDCmIZ+RelEpxGuudDjgsrYKQ\nHCBqvycdbmYJnVyfHb3py3BNWzlUg05z/kTetch1BsSgUkHH8YC/edYnPYfJ\nlQ5s\r\n=+g1T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.2_1610045175092_0.7346270141418305","host":"s3://npm-registry-packages"}},"1.3.0-beta.3":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.3","_id":"@financial-times/ads-partner-content@1.3.0-beta.3","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"7529698206607df3ae00529bf2e62468b1b22e56","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.3.tgz","fileCount":40,"integrity":"sha512-0A/ZufdfRUCneM4UxsnG82zkmi/vLRyFFWLrHYEmnrnGYEQ8XNMBVwIj5NmpKvAAm6aev5K5Ko/4VoIZy75gwQ==","signatures":[{"sig":"MEYCIQC48StjMtnO6V951M5UhLW55ixMq0HdYFIRihmbFoMc5QIhAJlMCZo+Lb+kfukt7FIPrhTFnzGX+Lfa5hn6roXrwING","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf91qTCRA9TVsSAnZWagAAL4QP+wfFdwLk69gO+Q6YYv3U\n6BGv02OfBkw/fyIlahyIBdGZPWSRKVIJGJt0FWQ2aXbaX/ldNJhrknIGLQBp\nn80T8uDJFPVUBVxxxey82Bxo9bU9/pOVjxENSI8TLtU3UQdqmxIIrBgcpZBZ\nntE2wCGUeR7cBPR50vVfv4pfpNkROcUyKfBiytQ9fc4ZSD6V1tF04460lXs5\nNJsWZNVhRWEPeKpPLcTqMMxcFBFvP1pEllBdhlBCMIQPEcbYrNvMCDMcRx81\nH/PeQciJyQdBQrKmFq2UdYnEVnJvAMCYDjKlRxllWCP9fbpzVtijFs66YK+9\neVba3RB6/4rvURauukJxzOi92ZrY73nAmp07Gx8U+vu7Efpom2bCWJ3EyNfm\nxXyJ0srcNDhQ7VqXMcHJH4a4ZpVpGrP4HCY0xpa8znLPoCjgeG5FFbSJxvDE\n/CMROPw7xyLUl3I9Q++xp/jQAcX/Tha/VhoWzCg80rtSZt3VY12XT7rmOxH4\ng84U7chFtbX5DC5og4mY9ex3zQ1SpKURvL7RF9h0dUIJxkOG7ge7tHQsUwCZ\nB8qcsyXBoA7revAmstdM3nMUvdGG/xWeW7CNWTZr/F5ooAtRVG2QhC1l9PWT\nqO+GJtQzhuA6ffmfbtFR7hc8Ukj2sEpLLRCXEpskJNYwyEpeUvA9sWyjrz5U\nWiNZ\r\n=KItm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.3_1610046099231_0.3564818665139913","host":"s3://npm-registry-packages"}},"1.3.0-beta.4":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.4","_id":"@financial-times/ads-partner-content@1.3.0-beta.4","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"1d1a996776f42cc7d0cd32d3efb979f0b268d685","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.4.tgz","fileCount":40,"integrity":"sha512-7XiXzq4qExentcW7RKWUYECWHsRRg10zVloXKJ8g9bNT3M2/AHL23yB6tbkVGMyBTiF6Xq1MeNefHQZiWKwnvA==","signatures":[{"sig":"MEYCIQCS833ybbnLqYd6nKIQqj2cV/JkgIBuNgPJYBVGIIylSgIhAI121i6PBqnlyMabwyJI8rpFEnW4jMlRv1wzHzK2Ya0a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/CnCCRA9TVsSAnZWagAAFA8P/04ns5pu/9Jv8HetHJdM\nqJdUKPhoNGy/YNsm9357Oi1EY9XzglDbj753Bm19sVm96HcIdudtMLESAT0C\noRw4gvteBUFUiIONWUEVaVoEqp4iFxFM1yyNOMDZ5JokmNhVKVOjG9OyXwpb\nhVgmjKSIDM+3jD5y+sn0/2jK+0jgmu76+neIgjwkpMf91XNzOKsJoJBhqJRo\nUC/MrtnWMIfVqNemU7CYkFxTYxS3V1gZd186SwiCJ7MImY5nTfTh80usDAhE\nng7mNM+6xutn5dauo/vhqAHq7qhHN54M2smBLFdAYx9hQLXjmUSqaYzCWa/d\nnjS3K4Pn6aQAcrsYfxvfUCwU1tWBg5PTm8y+Z+kF2ze1W10uT2BgmCXyix1b\n2RALVum8VcR2UAt55jBwKEmThID3RAhWl3nb4g5iCn89NS9ytOSvw69TbT/8\nOZzaGfiM1NdiVJmlqWfElevizO2p6uOmeN8qA/7eNgl9SrpkYfZHFOGHlpd5\nAS4QSNiQ7oSnP1DT3MTZJfGugaG6PU1D1njQXYl5IDuxDjlSkeWBXp0lxIuS\nQdNoJVrA96yixurRPvW3pwNBQuL/jHHwcrRzC1Bf1iURX4/QFpWptTMmR6n0\no6wtGqsjpCW5S/rk0TBohJ34Ijwu6j+Ty6AmtETjT5T/UxDKLnZYYsC0lOfu\nCjlh\r\n=5v0d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.4_1610361282457_0.442698729441791","host":"s3://npm-registry-packages"}},"1.3.0-beta.5":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.5","_id":"@financial-times/ads-partner-content@1.3.0-beta.5","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"981f798e5174ada437c0d30992e8b9c26619ec4e","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.5.tgz","fileCount":40,"integrity":"sha512-gq3+xStDQybvH/at7VAD2QcCt1bG6+OTTvDVZeL6TSiTyVCS7h8I1uCilhcHtH76jDe3gyA2iQegH1ahlIJ2Sw==","signatures":[{"sig":"MEQCIHDLLYWnJymCMwgtW2Qh0fgHZLFkZ4Cq1W4UwJo+GFwoAiA8iYe+N4JnmqrtneIWb2L58/ITqUj6+BuRr62Jzbjs0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/DTYCRA9TVsSAnZWagAAcKgP/A91beyRPZH/G/nEMOJu\nqicK5X0m3WI7hoDTU8zb1kXPuWOymU3toIcia2w6qO3SXmwkg9hgT5t3Vgx9\nWoSl5ySHYP7BXl6R2Uo4N4ZhX48kndl4MF6q5JDAxrXeAArk9rKLv04BENEw\nIuj6XQMolVjUjy1z3By4n+0ZkgGb/bv+JrH+RjJOABmVPxD/ZhJ64FB/ShC3\n79qGv+2dzfu+nJ1q78n6RLz/+G44SkLGTpka/Scc0mLlqGIL6oor9nBeYilq\n1/Fzzf02kKcdzVQoUfgVc/ThCqZ61V2YgmhGJwjMJ1a43kyq0uqBresPyf/9\nwuLVlrNV7POlCbHWH23MUlzp4DIi/5fwmfKOM4tmeyisHVEQdGVPYDr0O4i2\nIVjqJBnwaXKC2MWotUJBqD8rCSamVQxZSA59Uoy08gXTet75YNK/spGLXZD4\nfy0Is6EU2T4JSbApePzV+7f6MehrzTe6zLZ7/B7Kfu74lKIHQ/Gg+SNcpM0z\n+JUZMhQw2g/I0jcc6clFQF0XKlaH7M/SZOy+ggEqAoF5Nd3O2XwnOPQMIf4g\nl0wOjxHN//ik/Dw6kslnN5PR6ZTcqQ0B6ydCvZR38COHH/jSIpNN02cxqbVa\nED8A3glU8nWhTQ/tLPpWKdRd+4zoDi3qkMuVOP94knhvdFR8HXP77G5f5GO2\n7yw7\r\n=hjZV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.5_1610364120389_0.5379110248477226","host":"s3://npm-registry-packages"}},"1.2.4":{"name":"@financial-times/ads-partner-content","version":"1.2.4","_id":"@financial-times/ads-partner-content@1.2.4","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"cc3a96ae2d23e09c7d5377c3278c86995c0de939","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.2.4.tgz","fileCount":40,"integrity":"sha512-JcF8dx5uovlTJuaPZlgCAkov3ej7QgM+lFZMxm9LwoVy4I0yS1kSGpT5lGjXIeuOyaN3tvLYGO4rvZWaY9TofQ==","signatures":[{"sig":"MEQCIBwYIvjOLwq/HRSgOE+ICh7HJLS/iIQviCQp57bqFYtAAiB29Ort0+8DLNQ063Dd32OUKcYY69ZOgvmZCsS+pmnUbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/GZLCRA9TVsSAnZWagAAVfYP/Ap0q+NBB5yVu00uCY9b\nbPFWtdWwPTcjKF3IkWokkqjlrVq7yDaEXGWURauoqILEXk1Ak1VpnJQaXfAL\nJKjsosPtdqHjOOK+xMNJR5yjvle8fN844AE5oyVQPdLKNtuYpyiuLS0qCWBd\np8AKErlmR20Hy3eUXUTWsH9LCGkl/UnwkiWmiDaQJDFVwVTh97lMeyBduEQV\nkEPNuQLH4tNoLpntUxjQ2zcNgWZxQgmO+C0N1EzWpzg19od+ffFrC4KQsr7f\nHg0ThDkmqstZp+MFhW8z9Zy6gqi01GfoU3nd9/CLBr8xddW8NOplLmVbOEj1\nR5fXq47x4wNXER5eo0x0vEoNsjQb32ZVUJE+8cFNS8uXMzqo4knxkhUGe3Yf\n1Gq4WyKPmhFEFeIBk56i4bFUUvRVsRP50WPAmnJXlP0xpANqz91VLyW11s1i\n4TRfEvqnYJokfCUv305UNXrQxCBYkgf/A/jROm3WQCdXu+8j6z7Fda9mM5rE\nPJ72besw9duHm+wVzz3sizTtxNo0CEPD9hELyY0t4Mgpb65AnH/o5cz490Oj\nDbwf2Ob3syJrinsNMsYgcQurahPXrQmoTiR9HY9+Ky9ccXgcuTG90lthRCOF\nThFX9SS3cuSnWnJasnXMhafq/m7h0PoETgrZPUW3ydz43tt2H/BEKfM7AclP\nIP8w\r\n=0sRc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.2.4_1610376779254_0.5054035956053411","host":"s3://npm-registry-packages"}},"1.3.0-beta.6":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.6","_id":"@financial-times/ads-partner-content@1.3.0-beta.6","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"5002286e11899d90066a5dae90c754eb0b8b76f6","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.6.tgz","fileCount":40,"integrity":"sha512-6dKwvAclFyNd2ODa6ApyQ92pbUGwu9o0PSFHXFJ8o0ycT3XSDxtexo0syornRJr4ynLWggNKBbA4S3CWV1Vv2A==","signatures":[{"sig":"MEQCIEIFNMavAq2OdIY9hx8ceOb8KpAFQt9FAvEzuTU8IBAoAiBDCNDehooyvhoZQANlFTw/haPmg3WWpWeOwQKsqBGi3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/GtQCRA9TVsSAnZWagAA/s0P/0BTAymrMw3JoRu+JNHv\nCaQOLoP0snlQZGFqEO/ZTBdkYt0OuZPVG1rfpgwLylYKWrLTgaJsbtnjkQrD\nJfQmqTKnaZe0f8JZeAnThYXGfOvKheqPFOAjEIuVUZQBzRS2JEJb/KsgmkTm\nX9GuZkA6IHBEBLAdZemIYeQLItyHO/OzAuiBYLjXblenKdV11pu1RsQw2XV8\nNLoWEJKLiUkA9dFHl/zQA5tEXk+d9lEPDx4fo8HDyCkgNcBsyFbMpoaDGSgZ\nXge6tL1LJsNjYcrK1kw0zrCbNLlsM/cUoYPo2djBZZHOqV0yJXsDQrBpyEed\nHNG2KQ3aWWYrqNtp7aTxHbDHxYdr5KbhckYlanZEGqVrkz9ThpkwbQJdIc63\n359Wkh3VXb88b7V7wsofyJvrnfM7Y1yy+x1qqQ8KKb2C/ccHcyWQt+NwTyQi\nbmjiMfmKNv+W4TRXYP7I3SUiNI8NGpnXBXIhU8I6xICtC7vML3+9eJoq2gyY\nXshvkkIRVHiYNPeOQeR8c7Vfz+QR6dEumd3pyKH3VsxiaoBDBCVeqQBg/sYn\n0r6Cz5a7DiUT1dU8MydgkeXaF2aFgzLDZpZ1Fr2hJYRqjhDa8308TAwsUGH3\n3wULdH7nyQn4kf3t+zUT4vSpfi0zItrk878lMfWABFqZtYilU4WRGMnB+4RM\nJ/PS\r\n=KPES\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.6_1610378064374_0.23035191024688118","host":"s3://npm-registry-packages"}},"1.2.5":{"name":"@financial-times/ads-partner-content","version":"1.2.5","_id":"@financial-times/ads-partner-content@1.2.5","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"adb2b1a08218e92e10e40412167890136010167a","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.2.5.tgz","fileCount":40,"integrity":"sha512-oFSvTwq/iOGBf0uZ6MNWqignglnaxwbK1Kq0fcN4ec9mSPrpfOluZNmtkDh7YEH0zN9D37CwOrW9FpKnUMLpeg==","signatures":[{"sig":"MEUCID6i9dt+WOarjsSpyQPxHvCQ3k4/HJdosmFP+PGjc3hlAiEAmTQlZkveeEg8xxM7N5HEVPsBrSxwwXLFIyDiXwUXsRc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XTsCRA9TVsSAnZWagAARXsP/0Un6w4w28Es/+1vre4q\nwL3FdgEezS982LjflQuUZfScDv0sIj8ji05Nx+lwH97xupoJ+qlZj+JsCFKR\nSXixovkWgHDrDHE4pCpy1L3WaIbeGwV3GVdABiAehzkmBohUBtulrq6SYY17\nbd++dvvxElfqB3r1Jdn/3pQ3YUhsSwm7YVj3vTD3UogYIudXcJeDbMqiW/lf\nBi6hNn1mTGOsgmJ3c4PFf2qZ8WjD63tBK4TTtGtz2byPkTMGcXaqsNa5PTM0\nk2GiMv8f6WnxEEtvrS7Kwijhtop5bZDDorYdA5XFiY/2EkHP05eUsnF00hrn\nrP9Kl/smGASDJaS+5q4a4Yt2p95WTXYLfhqHqyrObDOipQPqpf/TF9N23QvI\nf1hN8BBk6xzJ8Zc99kKKTE64fJxodbMowwVRBEEKIus6I9DsK+oyHMw88kym\n3jIo9MV57h5CSm9mP9v9OD9KQPOd3u44T0INcb8d96F3C7zuoeVjieOpe6gG\n1X4Lt8riH8q1a+iJARBEz2htQ9PDjOrMrY+j3MR5Eiabbto6Cu0gLS2dz7LK\n+m+I1pQK1Ao/zdAB5fwjo8at9FpGpfrj9ESvjb8Y5g9xwjztevzMvdtsp9yP\nEGMTwlAaFkm5G0j3N36JSs9VUSFJpWNfYq6cvFxfUAPsA6j39XjDB4/Tcls+\nYGSo\r\n=875u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.2.5_1610446059732_0.040739131230641545","host":"s3://npm-registry-packages"}},"1.3.0-beta.7":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.7","_id":"@financial-times/ads-partner-content@1.3.0-beta.7","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"1c429a911c4bf11f93053831727438664bf78ed6","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.7.tgz","fileCount":40,"integrity":"sha512-x+YlcmKdTzQXIsMuZ+KlouP6BxscNNwXOORdKf6NK2gUacxAXWhRXCVglrzOALHKspNh36sMipg/OVAx91nT9Q==","signatures":[{"sig":"MEUCIQDlZYZmJVjutFOcgXOnYJ+fQrIpX4kx3JB6aH309Ls85gIgOBrMeVa2ACg1MyHcx/MJvaYGgSWsPEXpANYZnXlFtl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/ZTCCRA9TVsSAnZWagAA0/cQAIgar5n6eHMYk0m5b3xN\nPi5ghCNgKmfhdqiD85IQSRceYWEjEoHl1gazgFud3TNzevWnjzwSywlvvVwP\n0IPSDloklXOMJkiMBGLLvoOztvfJrQBadYtDFGq6sJgvK+87AEzic2M6BTLH\nwbB37q8ng6MNQgrTxhfU9B+wu4NkhweEiWszWf5EtVRqi1FEoPoDztZibZu6\n7ze1S/A6BwovORVLWqyjJ0WvzcXEly7we+7Esl/d7NxMSZd6ROL3d9DVbR5A\nIMBY3o3XY08gGRn27R+2Xu6ma1qZ897nCcmthlf/FRVVbQKzokMXwQiHDr+E\nCrGEShWTMJZml/wk2zD7eE58UHF61YKlQMvxxIzM5hHZ35GgCTsIF4HBKRnk\n44ML7DR+WQ4AzB4aPWqPW6lajY9tTR0fkcAz84+ANnaFWwn+AGUpqi2tUu+C\nl4otD/zY0BMAfoSkrfqjnZUnf9SbKHxJBMO1jSRGPCbcHAiU8wm0eDO7RH9I\nSXI1TF/DW9SkPvX9tf1g/0jEmQKUqt8sOwCKu03nssMG8GdEXuROF262o7/G\nnqWQwXX5d+rsANcRjCTIoOok9vzHWtA8QV5jmdWL78XMN87oJL6UZbRMTAYO\nwoghMtZMSxpldmdHlVjpmdVb9tH2FgkbXph1kL2v/HHmfS2kJnYiDLLSZBTD\nTp10\r\n=/WhK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.7_1610454210257_0.2100342880632562","host":"s3://npm-registry-packages"}},"1.3.0-beta.8":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.8","_id":"@financial-times/ads-partner-content@1.3.0-beta.8","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"57b49672b01a42c84b2147a655408cdefe9f8b18","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.8.tgz","fileCount":40,"integrity":"sha512-X/BUB2/q2Qa8loDOVNw8L4UrkBayqhVFtdbfWowGw4mMkfADjOEuL4U0aK7xTHwxiD6gPwRQ7l/2Yg5eUrNxMA==","signatures":[{"sig":"MEYCIQDQd1+VrF0LbqYJ3HBf7Fy/lsRXjGVuUZDha5l1QOm18QIhAMaI/5xBQyA18QfliHovWF7/QXQCHl/PPVSITOjmHlgN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/diPCRA9TVsSAnZWagAAY4AQAIFzv3Tjhe2eEQnwulC5\nYpZbaogCaxVquVd+qfyxHDVcMiUVC4ojkhFkNozOpYKXquYPQYUY5BC6VEpf\n9EalE0juV0h5ep6hYmYR8vXGCH2QRjRnXQl0f84p02T9nC3ENiq8upYhGBiS\nZQ70ngOBi4ISX7griCXZACMqQvOlox1gtfh2nDa20w7VKbW2QT+SmVimUY7R\nSVQE1+glpAfDPp8ZjcX0GNvQotdj4TlYCdIZ2ZZhXGrWBRI5xYW75+Fc/M8z\nHIipmE+7jVc3G49inhSUaYrvpVO01UXwy/0FQ3ukznf84XShD+M4LD5Iq10H\nqBufE83RSsluRKOpxnjxDEoKyBL1G1lMHerMtbfBFwYAslP2+Vr9CE6HX77G\njR9oasdxXnfcNh4SHY4GLLMG1FsdvTB5tTCIDoENLZj4/yFWw4GwOXUsE0S3\nycrDKakHDXK7UlP9gyEmIC7iaVI5b5TCzT+m75LKTCbLCqQavluoovwOfcEZ\nsyLu/RjuWWrHOQ6c8J85wSV9FFAKQLmnc/5kQNsdBqYTJ6zGCRyeibKYPR07\npKKvAxIpS02cuHTnzR2zS/y1NXIC/4OupgDJQjhpWBtimwsASZfs6u1JHQBY\nTcAtgOa7u+W+2eRDY73Ceq5otTyRxbuDqQeW8o/qOLbEsI+lsMY7JcOu6G+N\nFHVB\r\n=eDKv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.8_1610471567107_0.9311603443340173","host":"s3://npm-registry-packages"}},"1.2.6":{"name":"@financial-times/ads-partner-content","version":"1.2.6","_id":"@financial-times/ads-partner-content@1.2.6","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"78463cc75a5167b314e4b822798587472ec38782","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.2.6.tgz","fileCount":40,"integrity":"sha512-o2ODb6Uxnd/h5AllJxJaSpRHkgw3BDdgdLSPr4XyCvhPpBlmE8iRVcVm2P68F926zbI88LSPxeVrZj/L1Yp+Eg==","signatures":[{"sig":"MEQCIBIQIUNpwZO7MV9iW9rgAOTS5Rt1T8UQ38QvVft0iDfVAiBVVca+vHawBaqcdBqn4T6T0bxjCJEl+bppxuAlKtciZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/v6WCRA9TVsSAnZWagAAcvYP+gOSe/I1zls6t8fGFGXE\nIJFkuWHLG57rbmDa0cK4HSgEqVxrLopsjtBTgbLe8XHlfN4iKsa9irfHsSs/\nR6Rw9aBspBWRdojVtNaf2wB5dptayzElVvgtQjdiMkOaVmXTXW5BjHkn9bBG\nkqlPod54I0B7WO1xFkfjStAWh5F8VXS56bAQWRJxHBSLp+J/SL/NLlBIUK+3\nom/EImuDxWW29/bqhTltGSIzxJ0Hvxvh+LjdwYZGJC+3f4+QcCV8MzC5QVJi\nn9m2fsY0gAXmP4kLRZmQO1p532tmPXWpt4uTwzmXLwyuftfOCMNWwW+kpLfO\nenHnZwUR0/YSObaDyAmn+D3erDtMtMaxJotbYFAo9dXog9j+VdPcSy4HmQbY\nXQGrfwnn0eBYtfm8QViXEkowmg8OvOEF6nJitviGqZBtbyIG0PKwE1rT8m0g\nK63Glv2cwEvM+QGH9lVEYO/GqUqZefBxYWFsEWKfQWzPkqNPdKfVoeolf1NH\nvzYBtm3tiaWFvzgw/p4Q4oYN3iHGLCQlKI/XX248+B2K12EmLN2qWk1Lt5aN\nCItSQnmIXn6uVBHYhkkk5AH5WWLrSBDNul/WMhefbdUCLNRWm6PLC/XQcl2g\nuLkW7XfsUWuwZFX2bQiX7EgIgVvrxqGFccQDWmlPkem6lPx2nuyvmHHqJuPw\nqbne\r\n=DUp6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.2.6_1610546838465_0.32254295513150466","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@financial-times/ads-partner-content","version":"1.3.0","_id":"@financial-times/ads-partner-content@1.3.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"12de2315f8a4eb805a18f2f709974574b99db6bb","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0.tgz","fileCount":40,"integrity":"sha512-LMrl9LOUdQAp7sUC9n//fxrZQcT4ED8nIUuKjYTEN9dJa6BmW6sd55gNIStT8oM6MScfRxkKfcDyo5aAG2pykg==","signatures":[{"sig":"MEUCIQDdMnIkogFiAK/lcboSoi29Y+roFj314mqic9JIlCwwZwIgHib15RkxwB9PgiN1kDnlUWOBBUCE1kGLhdaZnxv0oVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBWNfCRA9TVsSAnZWagAA2/0QAJY+1fmJXNgFIw/cVW4x\ncFwD1RTB/I0dkMXQ+sdyyHFDecmnaYZSUlhBZey4CAyK3EJ+l366jSe2ZLwD\nWnEpFAjM7ab5PNjuGShuwAK2IjTAvi6X7ufBLCbfQkdEpmu1Au2NOij+1k11\n9Ys6gbO+u9BjXguKu7Or86BOQaxq7FZQ584SSaiAQsGYsELnNDhsAZd0oyrj\n7Ltx+PmUR2ORniVWi4NbWcuE6ILTzojuj+wi105deRnolZrR5en5vOYmM94b\nVlXD+MWwd71ZAqHA/K0L82F9FCyU5OCYKrm9PbOYqISNHeKqfOcievRtNg6W\nK9on6FUyFU93omOQex0AIrRAzJq4wEkFlCPWN207x/QJAc9VG0AqqaLkw5H6\noVzvu5tyOIAqw8a0u3D35W1fwF0DE1E6s0rMLotWA1QBmh9LLcpsf5OAyTli\nzSc48V3W4kJ+Fh7dTiTzqrucUe/f/BbPeanWFP11jUbNgIFGJcP7XxKqQlEi\nWbk18p+QggpM5DZ22spbxz1bqoaHGdBEi0iixRfTJwmYxauQ/Gh17oLOsfaA\ndl/ou8m8tpTJukqSZC2cnt5tvZjijNPciYQbWTWTQ7Gm4G+1ER2upZijl/xE\nsG+nCPJsJEHgEOBC99OQgV2HoTo480LZZrl4UjKgtWqJ+55sPhypsk87jpPg\n191U\r\n=eUf1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.10","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0_1610965854710_0.35492704086821614","host":"s3://npm-registry-packages"}},"1.3.0-beta.9":{"name":"@financial-times/ads-partner-content","version":"1.3.0-beta.9","_id":"@financial-times/ads-partner-content@1.3.0-beta.9","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"d3202e327723922d54cc37044e75104ef41ee794","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.3.0-beta.9.tgz","fileCount":40,"integrity":"sha512-1R68Fov7wF4Tjwx+4Re9uiHNSVSk/mo8MnQubWRNpKfzc+bQd8FOGUi9VR++N9MxwOaogidKuEz1wrYSrgbb/w==","signatures":[{"sig":"MEUCIQDloqIBktWV5D7UM6e8OO+1EI0+XcUypeQs+Bi0ubzxYwIgOcSJD+1sLxsXSYTRfuOd5YZaAmZ+zFR8cpJNJTBoY3k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgK6nICRA9TVsSAnZWagAAw7IQAIfEyVzGi0aeoP0WxF2B\n5fO74Oba5bY11Skrjf5zx8IZ2L7W5nX44B04PMAPHm1mUhrrF73/0RyP/6wa\nJlUbbCjdzRBuPnJJVjguT1LjUtBxvKJtHtpyZtc3rEv7fnixdVUjCpCziYt9\nIcOn0G8twJlXSO390EGXgrQVPMqVeuF8SBjqeJLEC/suN58uVx4LXIifUscu\nb1V934C++/p85kmAvKS3H9r70mY7kUljpgLnP8FAQ8sRSvfHNEvhDkn/nNHO\n+zSbRXeHae3BuP4rLXHN1XTUV9SQocd1M72j/SdsxUcjqBqSg9o6396EkDvI\nNWAQXD2WsN5fG+CpMniBk1Kanl/0KLgdns7awHLeNrY/UUdPnhU4Qmqep4n6\nNvF7vVQ/2vud7Kcy4oX18FelVPPtZXRQjjmPA7SFpV2+rxt4oj5KEh07sk8x\n+yk1hpaoPTigqkjE5QTNUWcGXoRToKCvqJ0EdfjICAXgCS8Jk3ih6jqKVwNo\ni+ALAWv0O5gnA9uA1RifDj3+hOfFW0m4VXVNDmQQWPYqWU1CBngWHT+BYedE\nHGbAqPPvRbRSGOe0mlyw/F2B+YT9befICk9wkZrdpKIhXf08P9ATiIDqJh8W\nqgpqXY5UMf3c8TK5fy7rQhcNS5gIiuE8QS6Iq0ekOrob8dJGayUFm194ADRU\niRPf\r\n=dakV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.3.0-beta.9_1613474247875_0.27842985526476904","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@financial-times/ads-partner-content","version":"1.4.0","_id":"@financial-times/ads-partner-content@1.4.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"242d19cc7b2bcddf6b6be5e727d2a2a552bceb5b","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0.tgz","fileCount":40,"integrity":"sha512-R9wIl0rGtUiFjRBOTspzI4e+pg3ScGcWIE2iV6GA0ww3MJllcyspcJroc8V9s/e5NJ/xbgcZ1cmmxHOyABbtPA==","signatures":[{"sig":"MEQCIChXS/AzGFDDAPCqW6Oa6sIqjTlxJX6pJdB+GtzzB7YHAiBmafg16S1vZ11ZcJEDOonlBc5B8sqyo4K5l+NEmIVq0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgK+bMCRA9TVsSAnZWagAArAUQAJu+m3ZsOUxgSo3D/FA/\nThQuSYLkZa3XU8bKbp7G/WEAt1jM1HNO/DvxWeyWUL13xgS0d8NYsVMnofAA\npMvTqQf7Ccm7SilwpMBXPKuH1icnBJQTZVdjQPvFTHczPbaNEoF/jNoFeHz/\nrN9g0Wk1CZ31d14jD5rZ41vyxlIEgmRG2O5dGAc8qD45YNkkVp/IIJkgy2on\nBjkcCNDkzyzA0P/XvYEID2vfpPk4bvPxzE3gxXoXy/u/l+wAHNdZY1WlKlOO\nSqujvDoujJGZUzPI5OqTSWPok+gGxsq7+6p3kvJdUjav7xdqFAVQpTyroXwA\n8oaHfIOL+vZFuAKi0sPol+qTJnOKdUes2JFEItAykeFlgAZvfgGUZUE0BSnY\nBR3hBhSBLt8Qfky4rrDRGbsDnEijSPHH/seoRUiU7zf0Rv7j9dzNfFFyxeJs\n6Zeiv8H38ogyKs1vj5czQ70wM0r54ZiE/ArFEbqXhbmh3CV2iKI5Rqxyibg0\nMxY3urkEfwP5aB8GX8IrpelI9h7omg1nqHl1cLjRtl5rnhMPPhQJHi/J64/X\nJUF+szkkoiTBeGLLHY2iBqUpTk8CXMWgjpMWDl/g/7on0BodvhtTJmJgg8aP\nNOGXjvUf+UaZhnBfihZExiPvSFEMs/SHQnmupbb7UOtKh/setyvTUZGB7Zs4\nt4Eb\r\n=amcW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0_1613489867982_0.006970258783766781","host":"s3://npm-registry-packages"}},"1.4.0-beta.1":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.1","_id":"@financial-times/ads-partner-content@1.4.0-beta.1","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"6f0bd711c6838cc21985ef71bb0eb92f47ac0904","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.1.tgz","fileCount":40,"integrity":"sha512-2HJF1k6T/0AMNDvzCnudwboRPrtJ2k55xKlzkCcjNZRTPrmwvWE9rn8oD0dqsxsopXEQzmCkJVgPzsPhykl8RA==","signatures":[{"sig":"MEUCIDNSRiC8j7HPjB09uYfxXzbO2JjI1TPo8ZinO517pZpFAiEAtm6Yqnu8itzoVhdyuTsP9QVBYB1z5jkzgxMytNu9EMY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgK/jqCRA9TVsSAnZWagAA4WcP/i3YUaK94P49QRDw70qA\nEv7vd/OBFJKjolFVK64FqaOpm9YxCxA7XrSjBHbQHTNJ7Z8zDq/4k2GqUxLd\n3tGzGX9C9/jr+m0zkC3msPRQsbxqJhCV1FOJ1qrEDbfS4vsbgieTlnrVDoOq\n7PDKG4hBhX5OyoL44NjJp8IOodNYKUqXT0a5aOORYoiqCnwnYQ472ZjJ0nC5\nnz6qxBybYClnIP5RyFoCuWiIirMcEfJte4gFmtm/CdwOLuRfYg+71vFgJ3QM\nOTW0O/Vuo2EDXdhN3genODku6OEiP6mD+mAF3gAgsJ5xeqPVk5dfXnQA50uj\nnH9evSvhks+jP3pgFnfMTgeLcImdtoFg/pO7JHvHqY75rbViYCaOGIn3EK/e\nnbOwQmj4REPNWidgnaCVc6oqQP/5ssEVajUe0+Y8jPVyLGEdsKKraiYc/j1r\nurR8eXdeOwlwXUjvcbwfCdbHXWfcq7MkJbLrccgL0gNSp+TmS6PjDb7shdsG\n3aqWNDIw/ndDxMV8zhFcJfQqHJBagaHKtK/kZvw2QqgrLiOwu8pNjBoJE9ur\nMYpTp8s0F9kNqFgOJfgqPoxRjAWOXY0wKEIo62dDEy4Ab8uUAhPZA3PBqF5h\n0TMZQMwy9y1kBilL3P5KSi7cyw1J8ocGXM9nltQ0azdn9U16supjKwrMRXIQ\ny524\r\n=58dL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.1_1613494505792_0.9545348509637523","host":"s3://npm-registry-packages"}},"1.4.0-beta.2":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.2","_id":"@financial-times/ads-partner-content@1.4.0-beta.2","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"ec8916673365239160f4b28a67f2b4236cd04052","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.2.tgz","fileCount":40,"integrity":"sha512-//fc1McuEXcboy1t6ek3NiillD3VTYbFAqcrdXIoiUhHgOq3gzMPGpB4cSGUt8jPjr+92OwXmPR5DF6J3gs+sA==","signatures":[{"sig":"MEYCIQDbgeoT3/8TjCjMuuPHlQXbydSb3T3JgaNAN53vsDUc8wIhAIyP89OVGEldScyxmWzR/I4yqmWKDSBw2vvduTseEFeF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLAWpCRA9TVsSAnZWagAAdCgP/3zGCMhm6hahfGXCEMrz\nBeRaZV5SvFla0+je1lG/sZxvXdyzR5MRhA8wx6M9i4zAc7JpjMTtHOpLplCr\naMyJ6O0uiZ0PULmgplX4Fer4yxvYQPtqr12NKYzocfrAIkJ1Na692BnAEXTB\nJbnSP2ofOH5kT8FJMoUknMyUA8H2xa1t6lgywzlwPc9T5OG15ZVaikQAk+2s\nW96cerdlcJ/gKZugt0jC+Te4gBpkYeobRqtV4RBwsDxtG7FHbou3OI61fBkZ\n/O1pdBzqUjd6nUt3ZoWz/sJ1qywQQP+QaUroBx90gHjsTa04z0mZTCcBxx9o\nXOBFTU4+wFl2mC6cDMa42LUbilMiBnM26y1X6cBG0LSEbk/7lBBkGYvg9lik\niiHdcioW+Yh4C9StIckoDt6guMrEHgJ1UZlmWEXUsTGhgJTCTGg4i1vyGzS3\nIwzwPmsy/9t7Mc1D1/PGTA27merQ0zXUBxshmE3T9HrlvbtDAt1+MEBBJRPH\nThRRsSWf7R5CYsa8z9poa10+Z7U4JP9k2+YHnIcVudOPa1DFMiGdUEgjg7qr\n1le+gAwFfnFHL9sB3TB5K85gVWDTZEW77FY3Ufzxmp9UvefAax3z1CN5vWng\nsktm1c9UX/jAnY6C94cecJoO0+spDLJcHV2NQC3auyKO0DILVMJafYoZo3G1\nqxZ6\r\n=WoD6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.2_1613497768470_0.7762528497438153","host":"s3://npm-registry-packages"}},"1.4.0-beta.4":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.4","_id":"@financial-times/ads-partner-content@1.4.0-beta.4","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"ee644bb489c77d67b17baacc15ddc2b6c4ac5102","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.4.tgz","fileCount":40,"integrity":"sha512-hYY+8SOC6lo6yFyqnBNcvSRaNJTbk0s629tPbzca6FOQnu191pcZ4/vbGQmzitOMAeHoD/942IPhm4NhN+rB1w==","signatures":[{"sig":"MEYCIQCp2gx4kdhbqg4wIK0ZvRH0OfinyZeUhIYyLInzoHK2tQIhAMCIMjsiGpRjOaJcuolzd5CgFIOnHO9NY0U3zUyLMF/H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM4SKCRA9TVsSAnZWagAA858QAJuuhgwSYbehxxkOgnfk\nwqjEwSJgoAAkqzpoQJYQhEgoUBI5i1MQrNuNdz5zdiRhJy1SnSZThdNHD3Jt\nCVkwQfZIimn5ZQe3T20F4a654/cc0kiFv3ysa7IO0GofM+HHYOsof12YcGJy\nQoXhWojCMvdI7/EuU73H3eIRepJWMcaWxzIn+jzST/xmwcZrw4ae2FNYS4lW\njqiZtFAO9+2dGZwxcdQHKosb+ETydGff/D0whKGoz8UOphxPd1HyQRt2sWYf\np6pP/WRYjEhzlWFAaHi9sI+1XBVY0lL8QWXo5K2n/mMR9AV3bqjN111W7BNY\nDO66kCuz8eb9GAwXBaZ2jF1ePj7C4AbdykEW1lMHf7XzA8U48Htoko0LvU4d\nsyIir5NSfWsLCeBo+Pp6t7JCsRNxOdl/alZkGQTaOZiWbB3/P49Me+s0fy+i\nQkFwrMwgY5kHKBpUMo74AMhBnciqwafzOofpOxZzIXlkiaoq7SebI+kMD93V\nhJ9FQOplov8S9J/w3+4flmVRiz+iUqnBYaWQ1fV1+RXirA8UTZeJtaztteb0\nBY2uBZ1r/GIf5LSuwyIKBXZRyPxImwM9r2z4GNKwJhd5zWH6WHSbA+OAUFbD\n13jPdypo+lTkfsDRTFz959HI7ZVQ26vEpysRfMvFBfoYbFVE0c/bGdpujlWR\nM9Hs\r\n=icbL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.4_1613989001851_0.8091915867081134","host":"s3://npm-registry-packages"}},"1.4.0-beta.5":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.5","_id":"@financial-times/ads-partner-content@1.4.0-beta.5","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"d0f6826498986bcea84cd92912d68162645c26a9","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.5.tgz","fileCount":40,"integrity":"sha512-acjgond0vEKZq5bm2aG/wwrqqzwIU2Qd53U2osvQSCmzBv8emqjviNp3+7UYG7cQoLZOJClQAQbH9l22P7wjbQ==","signatures":[{"sig":"MEQCIGhCKAOYMI4o8Ro2/iB/Pkbf/F2WIMsv3llJWziYqFu5AiAgAElKN6BY1oUAhk4Bq7bUhdXykjvv7XXxClC7eFl7dw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgONidCRA9TVsSAnZWagAAIPoP/1X+uppa4wUvpeHnh4qd\nuDN8mfusdpo8t495dMoDKkYOf2kW74X7IE3F8ogsNFDSFux/iFIc6K50D+Uu\nZEk825CZ+bnhQRXdzrF0J84S/VZNknGiPIhEa757zLlqP/ggA6vEWvJzoQbB\nVseSd6CNELeY8j4dWQR66u2sJUJklMMfNU5WxvDKX9dFB+2i0HXttxlM3OJJ\nvTBkhG9E8SbgP9z5UUWmfWjU3SeOprhKtCUJlkweR334kuuxCWWlnRLi0AZf\na5KpPoTEZDF6xxQMar+O3N3+qIatWr1eqJLOP+Oxe2YIyu31NOiZiz1zuVyA\n4TNj3uEiwoUNLyqoSEzn7ScubnMuuP32RxzGWl41LTLcZB/9H7EEE9FluvnW\nVzr9t83T2Bjyplsk3/+yaA39LxFI3YQ2ZVnijB8rNyi+tweDc3jvVFDG4pVq\n6OtKOkfn9P/8ySk+tV74aNn+s4QTXRMCiyxHipCgGYZt+7MKrPZ73yJ7sWiS\nzxYM8vkqrjxb/0Np/4n4NkOrL44FipJ81mV4WHJgF5VCG6LPOIa9XI5NnoMe\nx/a7CA/xyNye4cGeizGvw4r3Iyqha9Fr9/drLmdozdapR94AnYg9nzCEnRFZ\ntSZfQ0h6+XYUEvWREjxEZKVt63oGj2fLKy7nPIv/XOxuOgWVqTGq7kaRxDLT\naYBP\r\n=gsfx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.5_1614338205092_0.39185005209876267","host":"s3://npm-registry-packages"}},"1.4.0-beta.6":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.6","_id":"@financial-times/ads-partner-content@1.4.0-beta.6","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"2c0ee02fa45fe03d06ed26b9681fee9d2cacbda9","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.6.tgz","fileCount":40,"integrity":"sha512-MtoEnh3t+a9j6IqEvkhQ9QmMgBh5VUzudJFlkVOJBNKh/5K+z90dbcYW6whBcdFInGGh1jOnblDdv7FB2j7q1g==","signatures":[{"sig":"MEYCIQD2BnZ/6LTwU6nmlz4b0VI+fK0PkxL3r9DMIz5Qt2kCcQIhAKnTguUTGcSpkFTvTadsO/5TWiwm+C4oH5ctH51OPwU4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQPgWCRA9TVsSAnZWagAA7uQP/24jR4S5D2xeR4cWwZ3+\nrGo/pA2rbo5DuDXKAHpGaK5iifVcjWdmmoFSFcdyolCWHRLc7kIHSYOO5yCt\nFGy0d43vXrcWCO7g9A0yf2+IO4SC+oAXSDqPP2zRxKBLOKu5PaVXydcKbhEE\nb8IyJ4100SsUdz5gjPUNCH5/aDEgfPlmPQPZKlgV2p+uWYsbsrCiTBxlNcIm\nrQGskL6JW0ADj04LcANotEZuc2MhDrDQCYcF0JrhA/v1Q6d7JyxP9UwAt9KZ\nMQWhDMvf3dQHCW14UQ2E9GOCwL6yCNjks71bCSQtOWT6plW2YtmHQcXj2rTN\nHj1JyEG1I7QsBsz8HAhisUhCYhS0lgq5nbAmasP7TkQlvchbt4LT5z63yvWn\nuMpqEEcpY2vdaFSIZeSPsqwcEl4cVUW3cOwVZz81DaUSLw679BtbG3+8TNSc\nR6UNEgnAWC8i1OLDsA7I+CJqi9Ho6rjFOtoCQaa4A+MLCsTcyAKxltm1h0MQ\nWiVbfFelxVe96TM+0qkJQtH1hlcGbED9c2qBRLcUPmyAe1rwHmJIcKZ2m/UH\n/9NWV39QeEvfy/MciOQ52E440Vk0Ml8dMZefu8ZwqA2KrSE67pRUC7k0Bft6\nUdSm72tHV0lGZwr1aRe0Zv01cOpewfvDrr/jCJumDbsQT5h1NYjjPtr17+1S\nVEJr\r\n=bAZQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.6_1614870549864_0.9199101567912051","host":"s3://npm-registry-packages"}},"1.4.0-beta.7":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.7","_id":"@financial-times/ads-partner-content@1.4.0-beta.7","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"fb306e8cbffb6808e8f375ccf964ce10dc48d927","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.7.tgz","fileCount":40,"integrity":"sha512-k157E1PedCdwWnMBDV40THPbcOnOc0cAzeWgvaMPMiMwuXkEHnAX4oB5gXiyT6RgIXiJJDNvvhHnjnzYX6Sy6Q==","signatures":[{"sig":"MEUCIQDN9NvcegQyJl9U5MTtPtyso1JiFoK5peZiVzsXWTM1iQIgRbqhJxw8PNkHnWd/4lV2UE4n7cHumCSYaA9vCeDV5hY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR47HCRA9TVsSAnZWagAA850P/i1ynsnfeemi0RjHcirR\nDsjnD8trUajbeAGK9pXyOeLjMA2P0+WW22dbQpifEY3qjx7YUUeChzFuWSqb\n0SMLcfl2140e25qUaV19sHgD0fKNVr8x5DHPCtNe+HWsRMJoZqMAENsJ0M4t\nZGhUQjUfeTRDISkKUElpnWY4pumT+ncXrTnhqvcbP06h4D4tDcWHUqXR77M0\n4jEm7ArMyvmcHv6Y4jhuzj4KYj4qEtjkQBm7fdyvdNjstSdjn6vF66ljZj8w\nnngiWfCJKrgNRI0vtweLCYhCk1/bwiDavy76vTQBUpip4dFVG6SURCu36Bsz\nAjH1k/WhAj1qDAAQCrcswGMD6wGfj9IEepW56y/+r41Ij4ILXZG7KJIf9Lpa\nmB99lyEPQ9+2eC33oPHTBCnTbaIJHlkdhE7FQOqfkw/1bLeTpJQ2AlBXXKx1\nf8dxmG7WR9b0VIDj6WcFIgNHUCC9QesJ8Z1zZbprplQv3ZMKyvJoVj453fn6\nBVhSVbQxOY+RoU0nR/RzMzFOy33AJdd3Zx6p+Xj6fhVAYcGQgIVrytC8GKE8\nCnHj6VYUh3RyfeZgFvEoSvrOb/znOp8iwClwM5hIGW6BeZmB/W4DNHxkvvNa\na1XNUpG/yWNVwVYMv4Tinnj1AMBpOfTjFr7q9oAL9vZKYEUYObwXaeCJ17kf\nK3KR\r\n=057d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.7_1615302342796_0.4084905235331553","host":"s3://npm-registry-packages"}},"1.4.0-beta.8":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.8","_id":"@financial-times/ads-partner-content@1.4.0-beta.8","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"738c8c72b2539e15aafa1f56db9a1b100acc177c","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.8.tgz","fileCount":40,"integrity":"sha512-w9jp5dsAJXKLBdMzi/OAX3xIhw+LUFFCxS0B45yEAgL1i++qbpVM5xqsYkhheffYnovC6F7RpxJBxHRWLWP+9g==","signatures":[{"sig":"MEUCIQDtNWueX5kk55yTmt6jXWGAsT1I5HQ0z6rC5Sa2ByHU4wIgXgo9NHZXdzJ1+eknNvN33lbtcIIwunqYnXj4pXVZim0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR4+WCRA9TVsSAnZWagAAJdoP/A++ZVnZxh/Xpu9BzSfv\nJXD4VEgk3Q8wLWehs1QbVKkeKo8BJ9zJWvMVuWSBFFaUAg5Pszc+KAylkfoo\nrovEAtbts7HB84EOBRGLdSXV7g8Af5DwzLa3/f5EIBIBUTjZ58K+DR2+vsl1\nkgnxzBEXlfKkpSZx9kbB+oGGRzxzE3uxXDKScwv8ZYK64m8NI1B39bRyElfp\nORVLGF6jwzowR8o7PW114OPkKtSxFIpc8HPkzQuo8RkeTA8U6UC6HEllWN4c\nrjxrWoSt3RNq4E085U4E4o0iSAUantMYyvM7Xqjif34OT3P60UTUx7Brea/n\nuRk9dN9eJdUJBnYiTSVy2jtj0fEZeM+/dUXiQlZWH3eiHbV7PQ086AbsUJDV\nCtxJg1QrNXoEYatwPx+kyGaB1GVRcX4m5gcovP6MUZnBjVxAGo9gPbCNFSk0\nBfiQ8T+WR42nh7LXCpWdid07x7HfECx5am1FXoMGGRWAdw2K5lbzWmiE9XMm\nADIdStmorzDsuudLi+p+8U25tnLVWtCM6L58fzsx9slK0eUForQs6hQPjKQM\nCccHyIkxB54zUNUQl05KIOxSdrefTBiYqZgk65OcqIKwetq2K2GIiT/0jS84\n4ga74CzrVZLOoIc8vOov24HSk7cF5X6Em0WPRKs/KRyEmEfql1kbFH1eL8DA\nq96A\r\n=C1xi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.8_1615302550430_0.7098634137337425","host":"s3://npm-registry-packages"}},"1.4.0-beta.9":{"name":"@financial-times/ads-partner-content","version":"1.4.0-beta.9","_id":"@financial-times/ads-partner-content@1.4.0-beta.9","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"a2f8b2e3a6ce2d9b3a1921788530b90ca5c96ef6","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.0-beta.9.tgz","fileCount":40,"integrity":"sha512-EaSesGRD+xYFi1cIbr99oGKTpi1qzkLs1KKLgcc/4sczuyXG558aG4tgNrg0/RVD1ugFmXabiaOWuOApVog+5A==","signatures":[{"sig":"MEQCIDNlljAwmRBOnl0MzMrBIwSX0wKYJrbnXTJ7/P+fFI00AiA44/xHGsyKKavkPjVc5iNoT7ZKuB4p1kfQV210nW4rhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSeCPCRA9TVsSAnZWagAA50YQAKHdBMCVdKk9u1bfcFom\n9NHNELBuIfM6PPKIaGB+WAcOfYztNpppllWs5m86cVqACztwf3vir4WD952B\nWJWn81Nw4wJuE2VK8CvZAKmNoyva9ozpCM+Dg2xYLIVcI6Ts8U6l4qLNM4HK\nfSDJP15yGqqrY5EQmORV6ufBS4BuiGTubXHOUAG1quc/MyM8HYBgfJCuRTOT\nLEKmRBVPlSgCjGPmsPUcuyN4BnMTm+mW1IIOFogaKx2xz0PS7Q7YfmPgIJzV\nkFHLNBM81SmD7y/dW0UEBoqnIeW5yVN/MrYpnTxMG/o73LSKDMXgGpgbRhVL\n6iCu1MnTC7dRFu6IfHW4rP3qlCxMxBNZP1e6AHLSoK3ZNMZZj6sZFxXzQbcY\n+Jl+ZliS3X3o2hYk/T4jVeI0VVsWAi15A5B6P+FE4I1gaO6WuDXxVPP3L3/L\nLIPyuBIxwiUr0Q55b7KcG0F0DQ2HWKrVkIOgC1M582PJn7DX51WYir3bWWaD\nZAfBrfwFz1qQnN6xNYZBc9QSOgQ51ZmHN4tuIcXRR2Rw7YcqDHI/8AONzvBc\nPS4jGwZvf2y4iwFAHFXqEunq/i/lR/R8xD8Gvv29pnOv/P8Alwuhle9vuf5K\nuRlUtNBvNq0yRYdAvsg13AR9B2W5VajUeE//dJOm0YukDDEx28Y4N32iP9qv\n/YCB\r\n=/Ydo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/master/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/master/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/master/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/master/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.20.2","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.0.0","eslint-config-origami-component":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.0-beta.9_1615454351216_0.03058430363840081","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@financial-times/ads-partner-content","version":"1.4.1","_id":"@financial-times/ads-partner-content@1.4.1","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"3db9f5a294550f3815eeb4be8762a80beb1d0624","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.1.tgz","fileCount":40,"integrity":"sha512-DdiFdhuTS1Xd3S1mmzMs5uipxZFFYq4edTOdqq1mQL826SPLxyS0h3eMd4vVaRSvJdf2gL2tlOZ4Ch2YV6xzyw==","signatures":[{"sig":"MEUCIQCm1kVMaFmq0vQRRcwgiGvBy4gBEnJQ4iYuIbcMtg1EngIgIInwxJzmKJJ2BOVfWA/3AD4cGUSYzEqMoZdOoOpbBic=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUejLCRA9TVsSAnZWagAAKjUP/j9VW9lSDuFv3y0wcGY2\nyyY4Qm7vKY1XH1Zv2u3GAQn6yo3nGSGS2hAaNrxFxrRkGUxcF3FwDQeNvK5f\nHFLiK40aG814l/p0aMn6XNzJFvEomGHfqWbpc2VIQ3s+3VDIN2lFipGggmzr\ng1AiZVzSrH8F8k9cKAqvS99A3CbBVa0ZwDP5PA+pwz0+0qiIEUkSCNJOO9tD\nrX1X5GPbfDDb9ZgigpNAPzKUEZ8B4jqsIHDOO6dtTDRv38y8Up9jrS5UOteh\n4F0h7V3YteW3X3/dya3mqdnEYZDmalbmFBPjH6E26F/bxp5QAFVpGEhRZxPV\nwmNhdlhYJorFdLz0TnVnHDViDpzk2ck2JLxML0kKg5jhpb6Jec/vvWII4oze\nDlyPXW2UhhXAAkPkRPm9KqPgECJgzoHSokA7L61xxacNQKNcGaqNheB5rtg3\nuT/XVY85Vr421SDrncQKZhnI5jbYc9ZD0bugBwTAllkyWG8fd5DocJLsLC5R\n4eArE3vLzEwZSXZ1S8xrHjHGQJv8ScJQ01RGTsmARZ1ipI6HJZtcWJ0/eyGt\n21xL7x8OVO/BaK+SpqpdVkX2ZXM/WinexeqfOZ1SDS7ku8AJb6R2YiPVyxlF\nUagP4g/dNB4CGdQDIwkbcchDAWi8bNh6EARNBS298FUw5eH61El99v3fVggl\nxnpZ\r\n=ena2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.1_1615980747015_0.9126089219579854","host":"s3://npm-registry-packages"}},"1.4.2":{"name":"@financial-times/ads-partner-content","version":"1.4.2","_id":"@financial-times/ads-partner-content@1.4.2","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"720d719f2991d2870b48774f039926e2fb0e5165","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.2.tgz","fileCount":40,"integrity":"sha512-+edS5n4PI9lrw4YEXYfTfGgX4Ip3G880OHaMnmWXXqC0+r5dKsrZ+AIXwaDIa4nIDwkN7yPo88yXI3Ko3SOOOQ==","signatures":[{"sig":"MEUCIQDxTwXGMuhccrjB22dCxrf7u07UhJ4+J4WLUATtrQ+eqgIgaRhuHZqmyiWr2ITWiaejXheqJXxkLgh3OznbZzTIQIo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWgLtCRA9TVsSAnZWagAAqUUP/2ihg7GKOIBDk3iuhkjV\nHBEHDdzcaNjxQCVeCHK48ylSe/x6o5m6P9NoRlX9RassuIrmEzTViXE578I5\nBkUq4Elj7JD/++29YxIwtWc0c3KuDlftx+OdzRHm/IhmsbjXUGXjrTEE1G3B\nc4RqXjwseIdkOGzYX4Ha+C0qVmFW2MRQTdiPqDfqoIaEhPbovImQQhQfxBds\ncpuEy1ylSsJLkbtyjXFqdWuae2+35Bagy7Xe50phljvXKPXjNcMeunnywwUK\navS6KFlUhRF0XuG8RFESxg2Sg6TLZCinpoMjU5aXBcyLnH/r78hlo3eqrISu\nizWA0eeyUhkXNpN+D0vjeglzhkR9P3hxDeI+ZCS9oGkHBSfv5jumq6DU3dH+\ngHW372cdYxLZWQ0sTJdWLPBoRuu2kgoXsuxK0kJr7wNmBSmM1/9VQI1CFBQ3\nJ0mtppT7nHWbBscrJlKAIEYmPN+penY68+BY1oCEhhFVFcrMy1iQCdtCpqk3\ntaZQystxD4KJny0JUavI3xL4stIcvSEU9CHcHFYECRuBCupZExjGdildlbJ0\ngWMoTfJgxTJCdbWY23JDA8XZ+7aJH7XFnf2/85aPvZe1bVJ9s1UQesQFfwQZ\nhRjmLlztj+/bNkvWK8TyHvn7QDDrvQmkwLVacMuKX1QtzILCx805/kMqpW/D\nQBw0\r\n=jMJL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.2_1616511724930_0.1270777387165285","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@financial-times/ads-partner-content","version":"1.5.0","_id":"@financial-times/ads-partner-content@1.5.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"9d53076a0d6158ed97c20a182cf4853bbe9562a2","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.5.0.tgz","fileCount":40,"integrity":"sha512-3H+5dbEPjCoIQ4vRjjin9K+kPAtr9aRd6/FLK8qA3N+DboD8kO7dyWdF9c2ubv9USxiMuErqp//bU/aRVT10UQ==","signatures":[{"sig":"MEQCIHDn5pXiEb/c+wcNx6L95+e9eT9DE7ZfM8NAIm4Hcw0VAiB05OlGUpRJk4AX10g6TXviKFVVrEb4Pj0jXo1LMldwMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXKTgCRA9TVsSAnZWagAAiL4P/REFzwjeqGxDZ6/gx65w\nQiqwHJPDG/XZJl2J5WFYb6c9NOD/NIsGmPy6suZMgLVaFsaNZYjQQDIXIZ7P\nPU3xIUU8Nx8/BP4wmoIEJkuqQTrIAAvu8wNKEK96zsTnw/6c9MTxGXpHWIWt\nVqsob88VoPCLT4JRZYzA6rQitU4W2RumI3zkuXpjPkevY0N0oQe4+wpxcdwo\nkyISnewOC705HhkdP2ClhvqIfH3mJ8O0QiciGtJ6KufutSs2u600+haQnfcw\nNf+J2hZ1/vSwIzkY2jhmo/lvWSyDm53eLM8HYFOre4jx1SFl/0odXxJhn1IW\n6vCMOk+VUbYMh8kLGMj6pkZbhUN0x9HK931gncZkkv1Y1qFG4DR8MbnqQNbS\nFIV63lc7XccXmI7fLpUImVcMwRaVP4DXSZKDVFKVWHxMwaa6+YsP3Da3rWd5\nEh56sNxtOZRyruF1q6oFDz7u+D/7f8Sa8mtMIN8TPuZbs7EeXHTVu/RTzFGK\nBbh6niJehGQxV2k4ULKpYCLjF6ktULw/DeLoA/TZNky5Gsc5Q+j3oRHGyJl7\nbtUBLc2oTUAnogPnkINiahp3XsLjheuVrQQcDpViZM4IKKqj7kd5RGl49nYt\n1FOCF2NrRAPR2V59jsvcZOKx7O+VfFZ/tNTeBLOhT8yNvpKZf4j/tMeSOV+w\n8vgm\r\n=oMTh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.5.0_1616684256320_0.49236766271197996","host":"s3://npm-registry-packages"}},"1.5.0-beta.1":{"name":"@financial-times/ads-partner-content","version":"1.5.0-beta.1","_id":"@financial-times/ads-partner-content@1.5.0-beta.1","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"08f0b2d6cc300db950fdf500dd16922c94cd6ae8","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.5.0-beta.1.tgz","fileCount":40,"integrity":"sha512-Jk6h+UFTSRz3+PI2Rf8X7uj5NI/s3BvqfyRJoxHVieWUA2TUz4Rj6Tn/nTEwy+tV+cC3+gu+Ruu34hKXGvK2hA==","signatures":[{"sig":"MEQCIDPfdIivj5d8SyBWssi/FbHZnbBWLURTGj+2Dsx7FVebAiBsMhY7BkL1cJq+j9tbFl9WbIELKXdyLN7g1Fe2dV0coQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZF7YCRA9TVsSAnZWagAACKEP/RFw+aZepx2i0fCH/Qtv\nMg1DJ9BfK3ql0g7VkMo+qxo6Cb6zVan1X3cbdHrHSwJFhqWkZ+/N4XkZb6l5\niOtpcI3EpEnRG/nBBKo3Fr3dQWMpvlyXuTCzm5K4FRtofVL0h+PNiVH6Fava\nZvEEFYDgW2eS30ZEop7wHEieZZB1vlifcm1nA15sp3RE5V4eV8P7+9clJD2c\nJliJLfyRWRWObUxLYFvv2LTRGfUl9i2eGLheCy6cEWv4fD9NfSytm+cro7G8\nVIRT2ewM2HNIh0TBE0LVx8IxPN9dsQq+fJlf9IuzLvH+6Ae2dImVIwmPSufR\n1nUVul2QKUa6YQtJJlA225knmaf8+K+AeHSZknOWQSMU2HF3SR0KCwetVSQM\nhwidVFyaA1iEv5OUb9Nu5F/5yX+MQ7OzGizBd5z7/o7B8Hl0a0UscjaOonuV\nHxY/1JOonQ9r2HRsmwLVe3vELaVSW/l5tVw97X2UXIeEIUVuVppHZaKW8Lao\nR/iQqj3pSKjrStIcPKrzxXyXXD33eAYlakw6Xt8WDpuSP6ZFtng5hadWDVbj\n1iSYa4lQl3uQbDaoQgbUELDms0u+WGhX88hz/EMeKSc6SStE8HeGwWYb88b1\n+B96l2fIN21EjrdzmCOz69M+DeRLIe2o2/ulPN+ZtIBX51MHADKhkep5iHyY\nLj0P\r\n=pwts\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.5.0-beta.1_1617190616027_0.39092016686842457","host":"s3://npm-registry-packages"}},"1.5.1":{"name":"@financial-times/ads-partner-content","version":"1.5.1","_id":"@financial-times/ads-partner-content@1.5.1","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"1f2706bc5d22f9f8a545b859d6cc948eb208b967","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.5.1.tgz","fileCount":40,"integrity":"sha512-5Jl/E2oxRd6Bs/H8FpBgrku7xQZjTlhxFoeXv7NwHJYWZg4w8k6asd08gnNxaGacBFyGN8Cg7RsAVU+kAVQUmQ==","signatures":[{"sig":"MEQCIHuXxMabwcis6348dxSVsJBsEA5ocYoIoQIJzT9bIjpWAiAnWu1ZlSvoHScVtr04fZKTD5CVIX4eSFVt0Q3wJtaRZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZJVrCRA9TVsSAnZWagAAaccP/1dnKt79tvYPW+CdJjv4\nTRmEpPyfFkAXLn/19pwrCQSpJxP4zbcmC5wOAyoTQPo9VIzOKit27sPRKZb+\nFY/H4YA/6EZssIgrD/2KYtDbLJ7iGGWan7tRH+zT4z+8xst5UULfPKnfrF2s\nogpHwTFbeYMxQU6VUcGp3h2aANr4lrEh25TUUBn9Q9koPukR3bAOYZQTPTCA\nyxZC5oWXKxaKqM3WTsolvzHA89nGKysHrLDWrpAWhuxa7PHNcKrcJIBWYJXM\ni95bXJS0U8CC+kDku4V5OhUEZH17oc0e1t6uEXOppqnvCKz1a7Rl/wTlSelK\npmMP8qdAhYWYPA7YEYGXptp7qSAAwHefgagO2IW7+9y48V2c3dvEpOxYrycM\nH0HGCfw0u08JbHAqpMQVU5asjdKHQ9AuEDe+oC/T5fPowqOKnnoaMfYOxYrB\nf+cIxdnsD6s6Y0Df0IcBtzmCF60wb5lXhS7pL9vq7ViH1MBi1JaFGDYL9v4C\nzB9bru58WLAR1eNtWM4WjEU6cGZprBc2NG2F2GB/lgSlp444Dg4CJkx+N+pt\n4dU/e3xW8DcAUe6QeM2NW45I3aBWgpafqFHq5uNdBr7RzndfMQccDwEnPCqK\nNdKTaR0SkXPcwX+6BNjVFamieDD/t83CbQUaJWlcD5QXMLap6duRLsO33Hnq\nKTdn\r\n=O28t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.5.1_1617204587443_0.32900239667989917","host":"s3://npm-registry-packages"}},"1.4.3":{"name":"@financial-times/ads-partner-content","version":"1.4.3","_id":"@financial-times/ads-partner-content@1.4.3","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"f33cb99d5f36631457ab0b9e321c4699e27b1020","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-1.4.3.tgz","fileCount":40,"integrity":"sha512-ljM07nQkCZVNfCLqf7GAeVYl7/Tb7WsqL+Lz3TwZZH0bxvpxf50uP2BtreGZXyPNIEHiF2GagPAz6lVyKKq8cw==","signatures":[{"sig":"MEUCIB5Rw6yWMwVFeli1pbIYV0Hw+BfJJKCr7Vt6XxgeqSv4AiEAl5S4R+XqftwT1uoEcLVWA1uHWeSWwU/s47BkL+M8DoA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbHhYCRA9TVsSAnZWagAASjEP/jIay8GsB4rQiqUfBIvV\nWX32u7HpgLdC+neIISlAhdBje5UcPcPj6HDZVvi/WOgT6w9DzgqNhBdXG06F\n3x++avp4BskYDJKR3tZo9e03P4+EnY7wXhBmN8KWJGEs78Jse3jHLECTIWa8\n+Q3VdjDwimnXp8z10gm8EOiV5KEmsTSiEaJcBfaVIUVfrd8uo3F7cIYZpyoM\nJ2BwZrRG/VGxOM6Hw43FrOAWQUQpyFqPnrasEpZZoOAaZxgMN7lg0w9S8e+2\n+6Cb4E/IFHaT6KtNyhEFcrqrxl7wA4SNdonOo9vbdR4GNTqxNQuK5bJdBnzg\nhSwqHxK1jgHFvi21kGd2ptT2a7QyYwV56TeQZsv8I83YM4bIZKHcREkEzC2L\n7jkQjCOjqCNf/ZmDOW3LuVfV8rKcCB3XWIUZU4c1FLeY/LBWQuEPFcN5hTT9\nFQMafH8AVzTr3YkfF35o+kse0KWtCJ6JLkpEsRQL94BKsJe+wUvYwJFO+a+m\nVGsyHbDHkWRqGudORF4Rum0/jqxLHLgnpuw5M1lEoQu4C7FIKSdadR730r4x\nObwdgQE3jh8gJ9fAX6yvaTunWG/fUnLhsv8Cn8vUF3gnvuFHfyRfPUtK649t\nbKjfSWU3CWzfsXXe2vnZb0tTVg/1G072UjWuF4NkXpjqanTUAv3KFBZ2Rflf\nrqbk\r\n=kkpN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_1.4.3_1617721432340_0.2584884778238181","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@financial-times/ads-partner-content","version":"2.0.0","_id":"@financial-times/ads-partner-content@2.0.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"616523b56cdada73fdef9e12b5530cc5105b0100","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-2.0.0.tgz","fileCount":40,"integrity":"sha512-eGrQOSAJJUqLgqqOGRHKUtw/nCjDrVZnYULMVOV4SSUYTSj3ijWTwHYMFru07jFrkS/AjMNMNCDi99zl4RXlrg==","signatures":[{"sig":"MEQCIDzTj7tYLmqGBBs2MuXre7+vI/rjzU3FiJ2BhdssdqWUAiALQ+58VW4RDeoJdRXoDh/fvDKrd2Kwvzs/RRo60qfXSA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdWoSCRA9TVsSAnZWagAALHcQAIPz3qK6loIGTW9lFS7b\nZr3hkCsxk7iERCGqA/sooI/vwWI+qU4JcUIr/9MY7MX31thH03oVGXsg5Dbc\n0TVj+V5PgS7kACKEhdO6HKKNhkfliMYvnAChkAdPmwopvIlthP0bAtaKseSf\nah+IhV9IavYxCilRdRhr07Lzz4RCpaUEi5EgMQcgIg81oANAhUb9KPzWzqko\nAWqL0ZfJGcDtGYQ1Ayy7JhoiAnI5s5EEujKtLz2M/DCqY/dMM2f3IIEjvX6q\nii+d6Wmt+1d43KLWMtpyKEa8kGhRgW1nMqM+MZdnGxCkRMuvbxQ4h52AXVfT\nhyLQk4zi9PPWG2rHIj2VRr6EAyd96yrO4bWNMx9toG+mS+6UFhDxGiIfL3HM\nDn9fs744S/PUwkfEO09SPOqL0tvRnahjGuGhI3/GyOSnpeBQeyTa2biE0XHL\n+brRmiWT/H6J5pS5qlkxIlY+dEZqtCAmtx/fjfiAghNGeq/OYB/kvqM9+vhf\ndxxZ/Qlf5cb97dyJHhpdiNudBEPt6WPE1OzxWgRyLWd3HBCPQmb/ZrPumSCV\nNhWUM3JxwfywZgzJQPo4djxiFLEpZ9p80fDnfIHuj4dWlc7hCRBbCNMQOT+X\nr44hcOxJNXMetzqNeCm0nrOp8l9UZYICgrsYZLBKtxCypm1pl+P9B0ed+Dr7\nrpIP\r\n=kL8H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_2.0.0_1618307602351_0.3398675824971651","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@financial-times/ads-partner-content","version":"2.0.1","_id":"@financial-times/ads-partner-content@2.0.1","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"ef153d0e03a2827701c35b8998ce931ee5c825cc","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-2.0.1.tgz","fileCount":40,"integrity":"sha512-DwhK68yamDY74dFZ5ONtNM7xqImVlcfPuZLbVbQmHEoxxtYdy27+3Zb0ske+dNZDutDgehv4JTbbMK2V7ySK2g==","signatures":[{"sig":"MEUCIQDcvBOrmgEGVVd9IFOcgfdQpP0yL7E6R2IRJVRM6QRAkwIgEtRZXPHG1sGzYLeQ+VkJcdypTit/y+TJ68EmXILjmaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdv+dCRA9TVsSAnZWagAAgVoP/jORQmkJcq8/WZWbNK/m\nM+wBtSbqmK/0VW+5p3yfpv6leCVzZckODua/G3G5cz3Fqtiwuxsrs5vPNCpT\nIJGNWNsc1t1BWGTtRDq+ocu4WCqgZDEB0lT2OQWJPwMAHnrqe3fMCYJ2QjvM\ncV3HY33uqM5l9R9Uv3CPYhp32LgZ61FUSzkaSwZglXUSdJPQFJkdKSP02jLJ\nCLoTbya/oipIBKXPpoPulbJpRVODmHxJUEIm0tBnDhATaZUf5QtgmBKK7tye\nOD6gowuqVf9rHuCpqAZIh3vqPQ0Zgmid9G7flnx2KpZ7RN5JXw4P0cELi4WH\nrLnyjfPLb3Xf0jSJ5GwoYaGQ6IH5mSKwb3EnXN6EIWDcaviH9kx4/VAGYLTW\nc6zhuucVwO9Y1UF3kzY87kI4EN6aJzA6tBiXt2evOcTXNuKfIYJ85ELS53PV\nwPFQucJ7GLmD9qmsuVjKZZ+sRMFTdDlX15Ifx1rhvLtfkcU1lgft5nQ+3FNW\nGNeadE/Zyazd7jiITFeRoqu9eygYCnu4FWCAPogAOzghYxxSWq7mG6QZKoYD\nkgwXlQIhvpuyExZ0eZA2vRxY14oNtccAuwU0us8j669JDuCPtdeUXDSIWdrV\n/vE7Hq9gVl5ENNLvS2HdMKwAVTKfzyQinfNpMB3DdqDN3GKuJSrfpk4JbDs/\nz0JL\r\n=AeVA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_2.0.1_1618411420656_0.10307639023896997","host":"s3://npm-registry-packages"}},"2.0.3":{"name":"@financial-times/ads-partner-content","version":"2.0.3","_id":"@financial-times/ads-partner-content@2.0.3","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"307262b2afc988c9b0ba0adceb0096ab6ca6da16","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-2.0.3.tgz","fileCount":40,"integrity":"sha512-FxQWP8nYspGZc2X0t8CV303GFDbwPc9e1oEAy/RFpb+a2qPo1x1Zjr6PmjNy4ZWi4mGqMQPOrMDjORpUXVG0QQ==","signatures":[{"sig":"MEQCICKiZTEo6wBaPmzwbxcDGMvjUV1cNvTVm9yNpBAjJ9BkAiBBclPqiNIUTTOXucLbmfBweyyttAt8RivelS9Fhu19BQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeCTjCRA9TVsSAnZWagAANlYQAKPR5AwvTxk7nD53zJN5\ne1cH2kh877FtjL0oNlwXxzr0xHFH18sBYV3ksCrVi0mwBvlZrPI7pOm/p0B3\n07vPSI2WcaVIyOV9hjg5EeE0OhhW+5b2YY+X+dYxp02oTeYPyRwVathIE2yn\nkls4X/6pwaU0wkx1UAjSUaleZeR4BDs/hXp7YdPKaTW4Ij4UATjvp8W4uDd1\nh6aaQHnIValIy5SipsTOwsuVYJQG3MxqAy8+S93XrX7++6ORw7gyF2ASg8PZ\nOx3nrjd7Xyse/AaXl8x1z+nnAeeLCosKXblunWvlhD78935HMiEW6H29xuFO\nHyQnzEisaET/DaE4LmtnLNdUWsOQDFQS8NpfLtAvn5YU+BDBIK81+HkZECjD\nFi5c0P31NXKjy09oWKIRJYvDew1E3561QPGnqI/w5AGGy+j58t+NBi53SwAK\nu6pOS+eM011Hz5zVt2TRVrWmHm350aq4cdU6F5aRCm81uWhXmSnez4vKKBnz\nc0+oHT796WnA6fxdUG/kuI1eF/Se92BCFU8fo2UrKBy9PqJbsiNtvkrDEgbU\nL2SgNFLto2bNVrWQqPqYL64g9BKrQs1AHA8zLKduvgXn/xcfbKXuX5tFTNVV\nYdeljzfqMuO5v1bP+dGAq5KDeCw/YMpSzhrcPEWIcsrHOlpUFL4xIM8exUpu\n03kZ\r\n=X8qk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_2.0.3_1618486499346_0.5723415775979406","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"@financial-times/ads-partner-content","version":"2.0.4","_id":"@financial-times/ads-partner-content@2.0.4","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"613a77902adcd95f31d00459871283f9b1abd73f","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-2.0.4.tgz","fileCount":40,"integrity":"sha512-m3mphdkjlBq31TKfa8Fy/6aV4yYWyaMeR2l06SlO8u8ZvcPEJfJ1ZcwbTYo7NdPx866IcrmfkQechH8SPeivGg==","signatures":[{"sig":"MEUCIE8Dq9elGRz6AudVD5bUrQvxC1eGUjT/nTwL7+ulkf6XAiEAvf+G3/XReH4dGt/I4EVroo0tT3Yd/mNVVhOJmH8XUV4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguJV/CRA9TVsSAnZWagAAA6wP/jfK5fj4CDbaKJfsyPEe\nZQabuDm45A6Ya+7KnG5R6DIpFu/Nryu0AAy5MXn1tXQQ5g1qzZWNXo+C4RW5\nV6chlFl8v/+OOPv+70fBHDIdZgxOCSmtyNgCN9gt2cd43hVATnTPhVvtg3+I\nAml8ezxdAe+biydhYtO33CosQ6tevTLyat1Ha2Kj/bfWUyhr2BKhUtKUAKN0\nrEdD82eKMf3STG0MGGPaTQxKKwtLCjukZoTAflqfEUJG2wlsKpFO7VHLDANw\noR45+dwGQxGvqhYXnq5++vJbDZdLTbAXXwgJBp8JrWZ2JiWlvmgR47J6kwyX\njD3dNAelu43SzjU8eRpTSgk6NOirSCakcJUOJ2knsoXowCuoFDQwI0G0xRyX\nW0xtpwkv/GY2w0Gl+r8d3Qb5sPf/R9qNZMMxyeeSViyedd7dCJqQA0NMzNyl\nfHp1yA8QGGoPMKtvfmqsX0HJyFAwecfLKQHt0TntdqIxVG08EN+7YR/YT80E\nXZRqfmdejfVoI2ny+9wGxlu84yJIcnapj5u+wP9Z/mn795g6cwjIWGqkgm6/\nYkGPkqOnlj/CDRd9i+WI/jAueKGq+Id2BnxA77GfYYpYGkmlYQx3E+zjj21t\n5DKTLs+yETt+Gk08sMaj4wWogoCyvPqA0vf0YTX7avJM9tXpWb01rKhnV1gc\nd9Ty\r\n=9ovw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_2.0.4_1622709631662_0.6116874263938177","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@financial-times/ads-partner-content","version":"2.1.0","_id":"@financial-times/ads-partner-content@2.1.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"a2cfc933dce7cacf336c0b1d97d009c2212b85c7","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-2.1.0.tgz","fileCount":40,"integrity":"sha512-PII/DewZQOO34ASrTffGRD1NTFAytrSp5TMVrDkdyilAU76xu8e22RXssfxWNz1V46mrGIuYCZuXwalQshOLQw==","signatures":[{"sig":"MEUCIQDwEpn19pilPEGiUcFBtq4Ftehg0nlis3NmdbWNAIvDxAIgFA/rM0/FbQg95KxPwnO9Q56RudDczuEnrlA3t4wzFr0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgufMbCRA9TVsSAnZWagAAKdAP/0KoCP9iUuvhKYQIiGys\nKp9QGa+Cm9InUyjmNUtJIkcc+heZCGjdwVVe8YwZjA3FZI9jsLyepWTDf1lg\ncXu1viWWbqxDaQecFbrHmwii0J6uuCGTgxxWcMNvuRccv3Gz9J8onjhUk5W2\n84/jeqCZVoLZRJ34gPQFfbSukX4fAr3L014pMkuDmPf6ksIggGLTZ8G2f/h+\nrE6nNxFIFbR9jLo6tpCOptK1s+Ws3ZklM5SM9hWnQTJTALzx2jtz+ehERnU8\nvd+HhWEa1T1Bm1NnEac6x/mrEkM6yF6iK6ngmYUTwGd98hKndvd9nDzNy3BB\nc6Os4xlyhSDlTmwZ8dKqmjhVNrOMVoIjNMwm8/c5wBXyFEaQMFMhyaOzn4tK\nK40YdZfMkSXVb/po3KgLwiaF/83+vjpsxEsu0rahPsgjlO0Pt639q3EnSZyq\nOYelqZ31f72J8Itmj8f2G4mxDlTbUWQVjV5mpxbun9dwBcwAWN5wkLMlqFIv\nRWBwW+ckdqI2F4kO4oxISZxGjkySiGLsMgBcbeWXLdJHMe85r4RCL2Be9IA6\nWxzzOwv+fs0TBxA/23zZpPiBY8GM92dSMYwZqzlAzZhx7iJTIfZoFU1NwCYj\ny3CN6P0OVnwWXwGPkvDGBPkGDPvNzk4eThvExnO/nuhZW2n3C3S0GF2hw9Cr\n7w0O\r\n=9Y/E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_2.1.0_1622799131310_0.46304405679926797","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@financial-times/ads-partner-content","version":"2.2.0","_id":"@financial-times/ads-partner-content@2.2.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"7f63c29ca3b52f33acb4c841173544742ac75242","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-2.2.0.tgz","fileCount":40,"integrity":"sha512-pfRu5KfuZewYQcG0CsF/R/wnbmqYTZTLqY8kgj8T4legPw8q5Z+Z4caMwMIXAgTiRgziO8lLnC9egdJGCDonBg==","signatures":[{"sig":"MEUCIBeZ/K224djhula2NoF8bbFuHq1MWdQ17CutJKEnL2RUAiEA5jgbBMrNKdhIPwpqziNUR5TOMe1qd6MZZk0MEPUh0rI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7CIUCRA9TVsSAnZWagAAAWIP/3RJUeHqvSr79m9n1F1t\nYuVS8rcE7Nm/cL3ITfxzGrsrWZ4b+GYxzNwg2SvOKZMSFYjSh03ui7HsNope\nihlHy76r7jvW2Zl6iSPD4IjGR+sZN6LWKyZ8KhCltlWIRGk4ecWW9oYPdlN3\n1s6zFsDLPs+Vr/3EqEG4CNAiO6u1bHSsKjyPiWhu6gW7IIWcz23/ebKGydqu\nhQXmcgYhqPuz448diD/DjpKVxF6GRgvCDWzrZ9TSuVpUORuvtwrXAZSXDguF\nAevmyKN+7G6irn1dMV+BFl0/3HH/9K6Qy6+uj0bpeszPTe7PmpaP7YGanQRj\nHYSU/ol/yFf4c4hBz+0VmKx/Bf+cjWK7OmxsZuMyaaigJ/bFp3wvkzCIgYp9\nd+dtSyAbjtdyfWXxZDnlpEOHhoZ4vGV3CFLKeJM7qpKpPZzrs4WRX0p+q8Ds\nIENVSr9rVsshEblL61uEThoXigaTdUEPmyZzE8YYiJzOIfQP8uwOXZUkiGHl\nRncMjFD/PaF8QsCzRNfT2yZ02QrQazxLbuQyswrNA2M2PIUrhYLRhA7sypTQ\nigQo9GLLgPxwq0pYlMyYLGFvDMxcYMszrFfRLtUDu2ZoVLgMol+1n4qjFRSA\nQsBlHfn4eOd9x7S9091SbYOzwcLw0C8SFP/sjluQyjRtq758OjtxFQrMvWm6\nOgbo\r\n=v3kD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","parcel-bundler":"^1.12.4","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_2.2.0_1626087956157_0.5159723676351249","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@financial-times/ads-partner-content","version":"3.0.0","_id":"@financial-times/ads-partner-content@3.0.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"acd134c61bf09e667c160cf2c1c82ac61985914e","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-3.0.0.tgz","fileCount":35,"integrity":"sha512-nuASX57/LxPaAbQjKrykRXHY6BM3AD7SNjLF4483BiR/hT99iQEbjymNNI003Y9RSm74cQjsBcF3Lye0J9CQZQ==","signatures":[{"sig":"MEYCIQDftuPZLlKG1HYSJGdn1QiGV7OPi9Zaq4vJBjyw/lhlswIhAILMGWjduWAZG84hUgkpipRk5sY8Rf1CFJXqoe5L6kHE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCmUYCRA9TVsSAnZWagAAT/0P/26YGVt35CxNCeEIh5LH\nCiqCafm5A4QtxBmEQd5NL5sT1pOt1yuDAgLSPkO0sM3ovCTkDD5hv5d6LsRp\nzbVikkGoySgDbUF2VDmFg6a4P6MdAmvN52wTpr14fAnEJtZJPtu4WS/L0HfZ\nyCw4FH+XzRXyPGeIQOXIHynVwPT3+JTcOt2f4m5MXhUD84hD9Q2rxOpQpwiu\n8n/bSNwrkE52eqhgY21zYY8aV/sRNejhdu1foGtdtPf3zbZDTvHGKwA+JBqK\nYOK+oglwyVaG9+cO83sQuxQf+BBhoUXsnYuDZGEFdQEDkJt75/3ylRsWDzTX\nX/wpwu22UrzgcIgFyByIm52X4qkW9t/vO302gp8e55xyHYQQADOtJDo/qrvP\nMIXWi0BVdId28JviUCIHdggwjMQVR97f3/OQCKXZjF1WHRG4cQrZOqcKrDLZ\nIxcqmGM99k5sQrl6PhB+lAQMNayyRKz9I1CDZZPoCup4EzP6IwyCMR8UiLty\n14WBXW9Mi3ZaxvFQN8b3VN9h25YKOp8F+ukfjQLFQgCs2ViH8uMEXPHOUEaf\nSin2RSJ6X3lgUVFh25HVpqkwH1DdT2jVrWYQCLs711PxmKAPheB8I07avqSn\niQgSD1vUZNHg8NuRy3GMOIlO1fpRpdVaD5I5+AZQW3Ox8w+fmKh3dslYSyop\n4tuz\r\n=9Lvi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_3.0.0_1628071192211_0.9774566209294495","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@financial-times/ads-partner-content","version":"3.1.0","_id":"@financial-times/ads-partner-content@3.1.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"e6c0214ecd7dd8a935115455b3ecc8230f833c66","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-3.1.0.tgz","fileCount":35,"integrity":"sha512-7sD6j6EkVbIq7ErNttPbvCk+n56ksBMvATlbPUttiPeG+ylZQXKNwJaAHnj+t2fQuOXZqUAjp9I0Ms9V2IBKJQ==","signatures":[{"sig":"MEYCIQC+dSHjmMX5QspPNdZNAd5XR5h2JmicqtSjC70QRAt/kAIhAOSnulluALb9JAUh2oGOsTxvXvRex4pa6IDhUv4E51kO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI84mCRA9TVsSAnZWagAANmQP/2bliqFAuoGw/7Yct8yO\nWFUP5Eu+3cVQxhaDvrWYmllsgVZCxLn68muTlJuV+TgG62W91Ct4GRV6T+vQ\nt5JBqh6LzzVBmzneKwuhz6GLGePM7mobM+CEMRdbf0Ylz3PfVPqMyLNdQa+c\nMJu2Kw68CoxHZyNOGEzPq6ayNIovaOl9xM0Uj3/lEiPqQ3qtsQm6dliwHwkP\nJ+nCHCDfqSuvX8iMBxuCr01STweI6ELsjcLa6c0g/634FoTvSBXYIEUCahWb\njIApKdln8xnx7JIFUEoOZ+ZruexuN5ALYEcpxeIJwZY9bQqf0YVuwzWg3Zv/\nTa2jVp9Luqj3IkK+p2grDU4nADhZ9WY/Y0NDDDycBpBaJ0zKglGeeG0ZNKmN\nFo2I3RRBYBwuE8t2VxKXCp9hTeVZjHmmKy7BVV3yZbf+a6QBu7wybu/QxDMu\n4div/2O8NYxzy348NqsiVx+8WK22MZqpxQRXxU8QtGEVjKFbqLnhSrLe8Ikj\nw4usYzcJhTC/hwnQPGUM5UPYmArd5YIuHVCovFhz8TfhiUaRj5xEX/qWBtJA\npStxuZkCw2mp1QKZLxAKj9Ny+uxPPLY02t2miy+t4Z+7rAhKp7ck+W+/fM9O\nXe7I/VVlROZxrrciH8BseSdr8Z0X4WwwVhpFziroUcOvsCSGX+zqPXsRh+cj\nLUYn\r\n=rlsI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"11.2.0","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_3.1.0_1629736486327_0.3766846939668338","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"@financial-times/ads-partner-content","version":"3.2.0","_id":"@financial-times/ads-partner-content@3.2.0","maintainers":[{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"i-like-robots","email":"matt+npm@maketea.co.uk"},{"name":"aendrew","email":"aendrew@aendrew.com"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"5d55798891a95480abfd4ad2f1dfd64bd5512617","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-3.2.0.tgz","fileCount":35,"integrity":"sha512-0Kuw3fSkhXZtmqDuRP37Hv9hkSwDmjR3l9gNsaYiuCoe/H25SqpGGYZee+6v8Dqr6GDgptbKZ9HwGRw3wwXPzg==","signatures":[{"sig":"MEQCIAIig/o+LXC/6kuItl0xznYCGeaJ0oS5CUlEXgA23+95AiBtv1PZq3j06GSeFVmAXNb3njulTSr3eS46ollvadQkBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ2dACRA9TVsSAnZWagAAEAMP/1YzHXaZKRyrUv4VKV5J\nL7Lq22LGCR7dF0QtE6feNwVz62fcPv5HwkHMIW3lnOw7jZlJJABhtAusEjs1\nqH29jmr+um0sxbXI68oQeZ9XFJJncvb53M5WXhP9y/KBmVHcYHVDH0XGBrl5\nyXRFbqdG8806aMErrqjxhNfd8ezzEj1uCUrtS5ETbIz0tA+ko/5XRKVObJ45\nL9EsXhkKAEla/NuXyJcquc1LHTl9myuaYIcixd+6M7XoqcCAloYuGIGg0k6r\nBXcHUZmAGdx5T2APjxTVmpwaqE9zRmWKoDvV3Oly8fRBLcxK9cAL5/fIwcSF\nKEkqjVqxAj2VUtkVmiOBc2RBkCFbQTFo6uzSzfDSK/Djm4u38JWxta6o3aV1\nh1I3dbpzYBwQTuER7ZEOdMhlVUnaSQf7H9xaURoHEWdlNcp947osSUS2PYLY\ni3eA2RHrOJkmv3DD5qw+c9H9+lrKbXEDM3/5B4ALg22qGJqPOGzhxRGpYPeo\njOiQzYCiOIQs7e6N9/LSBOar8sC/64/tSU0scCRhUVc4YMzEdYEyaL56bvpm\nGiuHDsN8GTFI/+wesj+P+UX+qBuVAykZzicV4iDpdpjaC5qYkuh/6DdozVA8\nhsaMR+gJbobtx6o4nQkkzI0lIMICD+ZN5eSlMpf2/Ychxv5KcdG4Y0rZvZl7\nI4/N\r\n=KEac\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_3.2.0_1629972288570_0.0021155732470194977","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"@financial-times/ads-partner-content","version":"3.3.0","_id":"@financial-times/ads-partner-content@3.3.0","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"bfbfc21a5b401bdc4a004b282275434b016279f9","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-3.3.0.tgz","fileCount":35,"integrity":"sha512-Wrgz7CVDR6KDkT56yNj6J7bcm3sVSApYXdeBAKolVUx4+9buodKBWGAkEm7zh38RT88ri+cgCNtFTcESjHMcbw==","signatures":[{"sig":"MEYCIQDYDvLeNUxlMMR7fSCzALd4zQhXgE/Hi++LEO7E5sXrRAIhALv/99dR/NzJ6swp+AJ3LkSZ2kXmyz86wCny8ZmVgukJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109562},"main":"dist/cjs.js","module":"dist/esm.js","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_3.3.0_1634049149590_0.5722936003574262","host":"s3://npm-registry-packages"}},"4.0.0-beta.1":{"name":"@financial-times/ads-partner-content","version":"4.0.0-beta.1","_id":"@financial-times/ads-partner-content@4.0.0-beta.1","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"8a295c9ca624b09fa208b925dde06e5d4020f031","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-4.0.0-beta.1.tgz","fileCount":35,"integrity":"sha512-1eRB1VecedjQvtdmPVKSTTwvWxJupKCWCjv42TTaDScYoeD8KlQ47kVQMH8GDtLib2WZtRFAUq3yBstIPiXjqw==","signatures":[{"sig":"MEYCIQDwSUqP4l55TiBv7gtOQxYq5M9wIs4ewRyky1K6uymfEwIhAIm7Z2hEqY+R96bnsLuHDhvqUsNuASETfOh0ijbrrfhS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109569},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_4.0.0-beta.1_1634291807884_0.47903136348479536","host":"s3://npm-registry-packages"}},"4.0.0-beta.2":{"name":"@financial-times/ads-partner-content","version":"4.0.0-beta.2","_id":"@financial-times/ads-partner-content@4.0.0-beta.2","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"1972bd1df35de332d387acce03f5f6f959d72421","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-4.0.0-beta.2.tgz","fileCount":35,"integrity":"sha512-qKpSTuoSrfZFJe7dQ1eJEla9C+5KdqcLnBeHGuBo4+XNdHaemlNr+VM3bjhuzQ0XrNJKM+06nKfh6yt8OmSJZA==","signatures":[{"sig":"MEYCIQD7mlfjX7SV0rY7TPtlTI2WdS/xK8oDqJtMavfiBxb/TAIhAOXn8fPhM4gU7/JUF52KjFLYTPU/mMXpmoy2o8iD+XWt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109569},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_4.0.0-beta.2_1634313865688_0.9631291245479654","host":"s3://npm-registry-packages"}},"4.0.0-beta.3":{"name":"@financial-times/ads-partner-content","version":"4.0.0-beta.3","_id":"@financial-times/ads-partner-content@4.0.0-beta.3","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"83c331f7d80631c99d622cd51040958b868268d8","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-4.0.0-beta.3.tgz","fileCount":35,"integrity":"sha512-3kQm4iyVaWVMLYCWWOXJbwQAmuVFYAxMxAduy2Rc+WMCyQE9QsOfW5sFdVyh/b+pR2d2zR+MDWDgmN8Tw90y+A==","signatures":[{"sig":"MEQCIGBRDA8WTjPgCubIDDJuSLHwEbN2E+I1t2U4FiMvf1wgAiBaOG4rU2obG2k0elDhHKKt7mKkGcOC0gmNKKnq3NRE0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109569},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_4.0.0-beta.3_1635252642846_0.11050177817637907","host":"s3://npm-registry-packages"}},"4.0.0-beta.4":{"name":"@financial-times/ads-partner-content","version":"4.0.0-beta.4","_id":"@financial-times/ads-partner-content@4.0.0-beta.4","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"b8b0c4dc3abb5c0a8dc8ff3dc184e9def56aa08f","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-4.0.0-beta.4.tgz","fileCount":35,"integrity":"sha512-G0ioqPIyluS9QLpOn1nHHw7ELRovJjojMDma/oQ7Svl5jzQb8eETnSsvzNxtblGt+xfdjkEaFVsFUDQ92Y4Tqg==","signatures":[{"sig":"MEUCIQC7UiYri+cVkt4TWlIpgyN3Odaf3Zyyvj0E9O9JVRkHGwIgL5wz3txaMVujJmKqH+3MMgNa2VAfBWDcofis7BkRNjM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109569},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_4.0.0-beta.4_1635257071241_0.6941724514940919","host":"s3://npm-registry-packages"}},"4.0.0-beta.5":{"name":"@financial-times/ads-partner-content","version":"4.0.0-beta.5","_id":"@financial-times/ads-partner-content@4.0.0-beta.5","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"dc8678d6efc731b4d0431e4f1a01dc18654d6a2e","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-4.0.0-beta.5.tgz","fileCount":35,"integrity":"sha512-DCUjhj3DXPNJO5LyRR2pnJOcciuQ+qPO2k5h+6AT2HfukFs96+Rb9oDzrVzEudp2mMeoxSBBi/H6B4H+KqNXxA==","signatures":[{"sig":"MEUCIQC2wnL4xqTUXO4dcpZze/RjFufTyMFxZigmlBANkxTPIgIgaiWzZmhb4sxTcEW6f81tsjaSWY57WfGGOq9wTaOTBfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109569},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_4.0.0-beta.5_1635258306592_0.9293425603697811","host":"s3://npm-registry-packages"}},"4.0.0-beta.6":{"name":"@financial-times/ads-partner-content","version":"4.0.0-beta.6","_id":"@financial-times/ads-partner-content@4.0.0-beta.6","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"b41d4ebda29bcee3073e46597271ffaf5c24a671","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-4.0.0-beta.6.tgz","fileCount":35,"integrity":"sha512-XidYpeaqV52nqRu4Rw/eapem7mkZYb9lz1DZFpYDKEdAlL42YQ8tIIwTnO+3w8hCKIzxvysBBqbaulGZuQV+3A==","signatures":[{"sig":"MEYCIQDob3HBj241a/ekvxAKJHFdwM4Brmcn0p9JaSTQdGs0YwIhAILwqgzi6tedSKPB29yvOvU9dHInpNsko9Ia559vGBl9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109569},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"6.14.11","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"12.21.0","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^8.0.1","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_4.0.0-beta.6_1635259842900_0.8699905659454861","host":"s3://npm-registry-packages"}},"4.0.0-beta.11":{"name":"@financial-times/ads-partner-content","version":"4.0.0-beta.11","_id":"@financial-times/ads-partner-content@4.0.0-beta.11","maintainers":[{"name":"emmalewis","email":"emma.lewis@ft.com"},{"name":"aendra","email":"howdy@aendra.com"},{"name":"briggsc","email":"charlie.briggs@bbc.co.uk"},{"name":"the-ft","email":"strategic.products+npm@ft.com"},{"name":"quarterto","email":"kara@153.io"},{"name":"rowanmanning","email":"accounts@rowanmanning.co.uk"},{"name":"mattandrews","email":"matt@mattandre.ws"},{"name":"jakedchampion","email":"me@jakechampion.name"},{"name":"sdbernard","email":"steve.bernard@ft.com"},{"name":"bobhaslett","email":"bob.haslett@ft.com"},{"name":"joannaskao","email":"joannaskao@gmail.com"},{"name":"robinmarr-ft","email":"robin.marr@ft.com"},{"name":"ft-internal-products","email":"ip.engineering@ft.com"},{"name":"chee","email":"chee@snoot.club"},{"name":"notlee","email":"lee@leemoody.co.uk"},{"name":"tatiana.stantonian","email":"tatiana.stantonian@ft.com"},{"name":"conor-mullen","email":"conor.mullen@ft.com"},{"name":"alexwilson","email":"a@ax.gy"}],"homepage":"https://github.com/financial-times/advertising#readme","bugs":{"url":"https://github.com/financial-times/advertising/issues"},"dist":{"shasum":"5124748107f0ffa9365798414cebc29333476d23","tarball":"https://registry.npmjs.org/@financial-times/ads-partner-content/-/ads-partner-content-4.0.0-beta.11.tgz","fileCount":35,"integrity":"sha512-CyRRVbExEyN7sS3qTZRS28LpZl9CY6PrXxgHFW+nQNllFxXqWcVAlcxI0qB5/n5/sOwxkWESnBMm9bNycONCUQ==","signatures":[{"sig":"MEUCICLJ4UqCoJketwWz2gRrFmQRrS/P57FQdm3Wcs/kTCSbAiEAuJ7vG2jHm3SdzrUI8mGXzK492S+IDSui5v1/hi6i+Co=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhu3xACRA9TVsSAnZWagAAuRkP/1/mrypYnl4Ud54MrsSx\nM1eNcyp3x2xIQr1TyKkcWd6LZ5Tq+GiL4BAFGoOK0lOawH6utYkvwWuwQRJN\n0cBygw7qj4/+bGO6Vy5Ne6YDD/8E+k8nFLttd7KwIQ8xN6kl841kR7sVzO1d\nlAszEVs1mrCsRfNHiF4v46idlEtjETXaTB4wq05OmMZojMpOJUlCMjbqzJej\nK9M50wlE8ok1YFBPmmOarXY72pMV8IFzJv6RfIQRwdVOkplhaztvHK7O3RTN\nXE7SOWBaTvQ493diaiZ5UDtOfDR9lmJd8Epw3DA5GI020Bp8HxB7fFF+xTD7\n/Gsty5wcKxZw7QYsUurROGNRZygd49eYPw73dHaQ1iAEXaUQB2j5JTc9MHYp\nqUFbnFPMgSQvRq7dpCOrdh5NkGtJpfMnGXLopfNTFrzLpre0xNPfEj7qQTtY\nmZ6u9tlfjj5olZiHMAM36gDLESBW1eqbesJo1SeQfwfx+kaFDCaf11EGBys2\nEC+x/MFd3uj16SpphPECPs5hFPZe7St2T4Bp6HK2CYsBScEMae+Z0d2FpMwh\nc6tp97SuadpikyeRTDRECZaUyt0tEkgXFAW/xE0YcYEqOL9buVns/kFdjAX7\nvIHz22twTkVGelid0Kn6PwozAgUBs9yFrDVTZJnM+gDw2RwiL7M5F3Ffkn85\nSNbS\r\n=Xze1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs.js","module":"dist/esm.js","readme":"# ads-branded-content\n\nThis is a client side library to get Native Ads from DFP as JSON, you're responsible for rendering and loading the tracking pixel after the ad has been rendered.\n\n### Installation\n\n```sh\nnpm install --S @financial-times/ads-branded-content\n```\n\n### `init(options)`\n\nThis is the preferred way to initialise one or more ad slots on the page. This is also the only way to lazyload ad slots. Call `init(options)` with the following options:\n\n**Options**\n- **`oAds`** [ *Required* ]: Initialised oAds instance\n- **`adSlots`** [ *Required* ]: An array representing the ad slots on the page. Each array item should be an object with the following signature:\n```javascript\n{\n  el: document.querySelector('.native-ad-container'),\t// The dom element where the native ad will be rendered \n  cb: (response, el) => {} ,\t// A function to be executed once the native ad JSON has loaded. The function takes the formatted JSON response for the native ad and the element where it is to be rendered. This is where you would typically render the ad.\n  options: {...}\t// Options to be passed to the `get()` function. See below for details.\n}\n```\n- **`lazyload`** [ *Optional* ]: Should the ads be lazyloaded. Possible values include: `true`, `false` or an object specifying the viewport widths (keys) at which to apply the margins (values). Defaults to `false`\n\n```javascript\n{\n  760: '15%',\t// At viewport widths lower than 760px, load the ads 15% (of the viewport height) sooner than usual.\n  980: '5%'\t// At viewport widths between 760px and 980, load the ads 5% (of the viewport height) sooner than usual.\n}\n```\n\n\n### `get(oAds, options)`\n\nReturns a promise that resolves the ad's data for display in an x-teaser compatible format. Only use this when you need more granular control over displaying a single native ad.\n\n- **`oAds`**: Initialised oAds instance\n\n**Options** \n- **`skipSmartmatch`** [ *Optional* ]: for creating DFP url, the default is `false`. When Promoted Contents (Smartmatches) don't include as a your page's ads, set this `true`.\n- **`pageUrl`**: Current page's url for targeting purpose with smartmatch, needs to be set when smartmatch is on\n- **`pos`** [ *Optional* ]: defaults to `'native'`. Sets the pos targeting parameter for targeting the ad. Added to the scp parameter in the ad request\n- **`allowableFormats`** [ *Optional* ]: sets the type of ads allowed on your page, the default is `[]`, all ads are allowed.\n\tOptions can be combined between `paid-post` `special-report` `smartmatch` `promoted-content`\n- **`useNewPaidPostDesign`** [*Optional*]: defaults to `false`. Affects only Paid Posts. It replaces the value of `promotedPrefixText` with `Partner Content` and also adds `ppost-twenty-twenty-design` to `modifiers`.\n\nIt is important to note that due to a current limitation with targeting, we can't filter the type of ads on server side. Hence it acts like a frontend filter, rejecting when the ad is not within the allowed formats and returning an empty reponse instead, without attempting another ad call.\n\n\n#### Response properties:\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| type | Type of native ad, possible values: `paid-post` `promoted content` `special-report` | `string` |\n| id    | Ad creative's ID |`Integer` |\n| impressionURL | List of impression urls that will need to be dropped into the page to confirm to ad network that the native ad was loaded | `array`     |\n| lineItemId| An ID representing a targeting grouping | `integer`|\n| url | Url for where the ad should link to | `string`|\n| title | Main title for the native Ad | `string`|\n| standfirst | Subheading for native ad content | `string`|\n| advertiser | Name of the advertiser | `String` |\n| image | contains a `url` property, with the image's source | `object { url: String }` |\n| modifiers | contains a list of descriptors that can be useful as classNames to style the ad | `string[]` |\n\n##### Special report only\n\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| metaPrefixText | \"Special Report\" text used to identify a special report | `String`|\n| firstPublishedDate | Date when the content was first published | `Date` |\n| publishedDate | when content was most recently published | `Date` |\n\n##### Paid post / Promoted content only\n| Attribute  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| promotedPrefixText | Text containing the name of the native ad type either \"Promoted Content\" or \"Paid Post\" | `string` |\n| promotedSuffixText | suffix text for promoted-content and paid-posts above the headline. typically \"by {advertisername}\". | `String`|\n\n\nAfter getting the response back, you will need to make **tracking pixel requests** as follows;\n```js\n[].concat(response.impressionURL).forEach(url => {\n\t//trigger all the impression tracking pixels\n\tconst trackingPixelImage = document.createElement('IMG');\n\ttrackingPixelImage.src = url;\n});\n```\n\n### `track(adElement, callback(viewState))`\n\nTracks a rendered element and trigger a callback according to google's viewability rules for ads\nWhen the element is within the viewport after a certain time\n\nThe callback is invoked with a `viewState` arguemnt:\n\n#### viewState\n\n| Argument  | Description                | Type  |\n| ------ | ------------------- | ------------ |\n| `'full'` | 100% of the ad's content is visible on the viewport for at least 1sec | `string` |\n| `'partial'` |50% of the ad's content is visible on the viewport for at least 1sec | `String`|\n\nNB: Once the ad has been viewed fully, track will stop observing changes and invoking further callbacks,\n`'partial'` callbacks can be invoked multiple times if the ad gets in and out of view quickly\n### Example of use\n\nSimple example on a page where you would request an ad and append it to the document\n\n```js\nconst { get, track } = require('@financial-times/ads-branded-content');\nconst { h, render } = require('preact');\nconst { Teaser, presets } = require('@financial-times/x-teaser');\n\nconst pageUrl = `ft.com/stream/${dataTaxonomy}Id/${dataContentId}`;\nconst skipSmartmatch = true;\nallowableFormats = ['paid-post', 'special-report'];\n\n\nget(window.oAds, {\n\tpageUrl,\n\tallowableFormats,\n\tskipSmartmatch\n})\n\t.then(response => {\n\t\tconst props = {\n\t\t\t...response,\n\t\t\t...presets.SmallHeavy,\n\t\t\tmodifiers: response.type,\n\t\t};\n\t\t// render a teaser\n\t\tconst teaserHTML = render(<Teaser { ...props } />);\n\n\t\t// append it to the dom\n\t\tdocument.querySelector(\"#native-ad-slot\")\n\t\t\t.appendChild(teaserHTML);\n\n\t\t// trigger all the impression tracking pixels\n\t\t[].concat(response.impressionURL).forEach(url => {\n\t\t\tconst trackingPixelImage = document.createElement('IMG');\n\t\t\ttrackingPixelImage.src = url;\n\t\t});\n\n\t\t// track viewability and send events to spoor\n\t\ttrack(nativeAdHTML, (viewstate) => {\n\t\t\tbroadcast('oTracking.event', {\n\t\t\t\taction: `native-viewed-${viewstate}`,\n\t\t\t\tcategory: 'ads',\n\t\t\t\tnative_ad_type: response.type,\n\t\t\t});\n\t\t});\n\t})\n```\n\n### Example of use on FT sites\n\n[next-front-page](https://github.com/Financial-Times/next-front-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-stream-page](https://github.com/Financial-Times/next-stream-page/blob/HEAD/client/components/ads/native-ad.js)\n\n[next-article-page](https://github.com/Financial-Times/next-article/blob/HEAD/client/components/ads/native-ad-single.js)\n\n[ft-app](https://github.com/Financial-Times/ft-app/blob/HEAD/lib/javascript/advertising/index.js)\n\n\n### Demos\n\nTo run the demos, simply open any file in the `demos/` folder in the latest version of Chrome. Simples.","gitHead":"aa4e2cc7f195a7ee395835970ebf7fc0a64bb0c1","scripts":{"dev":"NODE_ENV=development rollup -c rollup.config.dev.js --watch","test":"mocha -c --recursive \"./test/{,!(fixtures)/**/}*.spec.js\"","build":"npm run clean && rollup -c","clean":"rm -rf ./dist"},"_npmUser":{"name":"the-ft","email":"strategic.products+npm@ft.com"},"repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"_npmVersion":"8.1.2","description":"Fetch and handle Partner Content ads for FT.com sites and FT app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"@financial-times/privacy-us-privacy":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.0.0","chai":"^4.0.0","snyk":"^1.168.0","mocha":"^9.1.3","sinon":"^9.0.0","rollup":"^2.26.9","coveralls":"^3.0.0","fetch-mock":"^9.0.0","proxyquire":"^2.1.3","@babel/core":"^7.11.6","lintspaces-cli":"^0.7.0","npm-prepublish":"^1.2.2","@babel/preset-env":"^7.11.5","regenerator-runtime":"^0.13.7","rollup-plugin-serve":"^1.0.4","@rollup/plugin-commonjs":"20.0.0","@rollup/plugin-node-resolve":"13.0.4","eslint-config-origami-component":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ads-partner-content_4.0.0-beta.11_1639676992343_0.12367286055089366","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-10-08T13:55:20.077Z","modified":"2026-06-23T16:01:12.469Z","0.0.1-beta.2":"2020-10-08T13:55:20.373Z","0.0.1-beta.3":"2020-10-09T11:34:35.091Z","0.0.2":"2020-10-09T14:05:25.527Z","0.0.3":"2020-10-09T14:16:42.905Z","0.0.4-beta.1":"2020-10-13T11:59:08.820Z","0.0.4-beta.2":"2020-10-13T12:03:22.922Z","0.0.4":"2020-10-15T10:44:45.588Z","0.1.0":"2020-10-22T13:24:06.157Z","0.2.0-beta.1":"2020-10-22T16:00:29.648Z","0.2.0":"2020-10-23T12:07:51.436Z","0.3.0":"2020-10-26T11:46:42.057Z","0.3.1":"2020-10-27T09:40:41.156Z","0.4.0":"2020-11-13T10:30:35.478Z","0.4.1":"2020-11-23T18:05:32.655Z","0.5.0":"2020-11-24T13:01:24.488Z","0.5.1":"2020-11-30T13:33:42.912Z","0.5.2":"2020-12-03T15:20:14.552Z","1.0.0":"2020-12-03T15:48:54.940Z","1.1.0":"2020-12-04T14:46:05.176Z","1.2.0":"2020-12-10T16:04:17.417Z","1.2.1-beta.1":"2020-12-11T17:35:15.346Z","1.2.2":"2021-01-05T16:01:14.018Z","1.2.3":"2021-01-06T10:47:28.099Z","1.3.0-beta.1":"2021-01-07T16:39:10.034Z","1.3.0-beta.2":"2021-01-07T18:46:15.260Z","1.3.0-beta.3":"2021-01-07T19:01:39.346Z","1.3.0-beta.4":"2021-01-11T10:34:42.588Z","1.3.0-beta.5":"2021-01-11T11:22:00.565Z","1.2.4":"2021-01-11T14:52:59.420Z","1.3.0-beta.6":"2021-01-11T15:14:24.496Z","1.2.5":"2021-01-12T10:07:39.933Z","1.3.0-beta.7":"2021-01-12T12:23:30.389Z","1.3.0-beta.8":"2021-01-12T17:12:47.236Z","1.2.6":"2021-01-13T14:07:18.563Z","1.3.0":"2021-01-18T10:30:54.839Z","1.3.0-beta.9":"2021-02-16T11:17:28.098Z","1.4.0":"2021-02-16T15:37:48.173Z","1.4.0-beta.1":"2021-02-16T16:55:05.955Z","1.4.0-beta.2":"2021-02-16T17:49:28.654Z","1.4.0-beta.4":"2021-02-22T10:16:41.997Z","1.4.0-beta.5":"2021-02-26T11:16:45.268Z","1.4.0-beta.6":"2021-03-04T15:09:10.048Z","1.4.0-beta.7":"2021-03-09T15:05:42.961Z","1.4.0-beta.8":"2021-03-09T15:09:10.581Z","1.4.0-beta.9":"2021-03-11T09:19:11.385Z","1.4.1":"2021-03-17T11:32:27.138Z","1.4.2":"2021-03-23T15:02:05.056Z","1.5.0":"2021-03-25T14:57:36.455Z","1.5.0-beta.1":"2021-03-31T11:36:56.165Z","1.5.1":"2021-03-31T15:29:47.600Z","1.4.3":"2021-04-06T15:03:52.539Z","2.0.0":"2021-04-13T09:53:22.455Z","2.0.1":"2021-04-14T14:43:40.791Z","2.0.3":"2021-04-15T11:34:59.508Z","2.0.4":"2021-06-03T08:40:31.831Z","2.1.0":"2021-06-04T09:32:11.436Z","2.2.0":"2021-07-12T11:05:56.324Z","3.0.0":"2021-08-04T09:59:52.377Z","3.1.0":"2021-08-23T16:34:46.490Z","3.2.0":"2021-08-26T10:04:48.796Z","3.3.0":"2021-10-12T14:32:29.764Z","4.0.0-beta.1":"2021-10-15T09:56:48.015Z","4.0.0-beta.2":"2021-10-15T16:04:25.941Z","4.0.0-beta.3":"2021-10-26T12:50:42.988Z","4.0.0-beta.4":"2021-10-26T14:04:31.377Z","4.0.0-beta.5":"2021-10-26T14:25:06.755Z","4.0.0-beta.6":"2021-10-26T14:50:43.095Z","4.0.0-beta.11":"2021-12-16T17:49:52.487Z"},"bugs":{"url":"https://github.com/financial-times/advertising/issues"},"homepage":"https://github.com/financial-times/advertising#readme","repository":{"url":"git+https://github.com/financial-times/advertising.git","type":"git"},"description":"Fetch and handle Partner Content ads for FT.com sites and FT app","maintainers":[{"email":"code.management@ft.com","name":"the-ft"},{"email":"info+npm@rowanmanning.com","name":"rowanmanning"},{"email":"yay@chee.party","name":"chee"},{"email":"a@ax.gy","name":"alexwilson"},{"email":"howdy@aendra.com","name":"aendra"},{"email":"emma.lewis@ft.com","name":"emmalewis"},{"email":"lee@leemoody.co.uk","name":"notlee"},{"email":"hamza.samih@ft.com","name":"hamza.samih"},{"email":"robert.boulton@ft.com","name":"robertboulton"},{"email":"leila.micollier@ft.com","name":"leila.micollier"},{"email":"rob.godfrey@ft.com","name":"robgodfrey"}],"readme":"","readmeFilename":""}