@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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.08latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.08

Package Sidebar

Install

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

Weekly Downloads

8

Version

1.0.0

License

ISC

Unpacked Size

22.4 kB

Total Files

5

Last publish

Collaborators

  • ywchuang_bbc