@brands-shared-library/gpt-manager
v1.0.0
Published
A JS SDK of the Google DFP/GPT api
Downloads
31
Readme
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