@brands-shared-library/gpt-manager

1.0.0 • Public • Published

Google publish tag manager

A Js implementation of the google DFP API. This package is forked from https://github.com/jaanauati/react-dfp

Usage

Register Slot:

gptManager.registerSlot({
  networkId: "1000",
  adUnit: "foo/bar/baz",
  sizes: [[728, 90]],
  slotShouldRefresh: () => true,
  slotId: "testElement1",
});

gptManager.load();

Set targeting

gptManager.setTargetingArguments({
  title: "example title",
  page_type: "test",
  site: "BBC Earth",
  environment: "developement",
});

More usage can be found in gptManager.test.js

Readme

Keywords

none

Package Sidebar

Install

npm i @brands-shared-library/gpt-manager

Weekly Downloads

10

Version

1.0.0

License

ISC

Unpacked Size

22.4 kB

Total Files

5

Last publish

Collaborators

  • ywchuang_bbc