1.1.4-1 • Published 3 years ago

didomi-iabtcf-stub v1.1.4-1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
3 years ago

NPM version npm module downloads per month InteractiveAdvertisingBureau

didomi-iabtcf-stub

Cmp API Stub code. Maybe included in commonjs loader or dropped directly on the page.

Installation

npm

npm install didomi-iabtcf-stub

yarn

yarn add didomi-iabtcf-stub

Using

include via module loading
import * as cmpstub from "didomi-iabtcf-stub";

or

const cmpstub = require("didomi-iabtcf-stub");

then execute:

cmpstub();

this should generate the __tcfapi() window function with the queing functionality.

to drop on a page
git clone https://github.com/InteractiveAdvertisingBureau/iabtcf-es.git

cd iabtcf-es/modules/stub/

yarn // or npm install

yarn build // or npm run build

Built stub will be output to ./lib

Getting queue of commands
const queue = __tcfapi();
console.log(queue); // [ ['command', 2, callback], ...]