0.2.0 • Published 8 months ago

@elbwalker/source-datalayer v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

dataLayer source for walkerOS

Made to be used with walker.js from walkerOS.

More detailed information and examples can be found in the documentation.

🤓 Usage

API Commands

Typical gtag API commands like config, get, set, event, and consent are all translated to objects. Command parameters are added to data. For the event command the second parameter is used as the event name. For consent both granted and denied values are translated to either true or false.

gtag('event', 'foo', { bar: 'baz' }); // { event: "foo", data: { bar: "baz" }}
gtag('config', 'G-XXXXXXXXXX', { foo: "bar" }); // { event: "config G-XXXXXXXXXX", data: { foo: "bar" }}
gtag('consent' 'default', { ad_storage: 'denied' }); // { event: "consent default", data: { ad_storage: false }}
gtag('consent' 'update', { ad_storage: 'granted' }); // { event: "consent update", data: { ad_storage: true }}
gtag('set', 'campaign', { id: "abd" }); // { event: "set campaign", data: { id: "abc" }}
0.2.0

8 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.1-next.1

9 months ago

0.1.1-next.0

9 months ago

0.1.0

11 months ago

0.0.2

1 year ago