@ubilabs/ubilabs-tracking
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Ubilabs Tracking

Description

This is a JavaScript library to easily implement a Cookie Banner into your Demo.

Table of contents

Installation

npm install @ubilabs/ubilabs-tracking

Usage

Default import from @ubilabs/ubilabs-tracking and call the function with the Google Tag Manager ID:

import tracking from '@ubilabs/ubilabs-tracking';

tracking('TAG_MANAGER_ID');

Publish

A publish happens automatically when a new version tag is being pushed:

npm version major|minor|patch
git push && git push --tags

Examples

There is a simple example page that imports the cookie-banner directly. Create examples/.env with:

TAG_MANAGER_ID=<TAG_MANAGER_ID>

To serve the test page run:

npm install
npm start

Hints

  • In case you cannot see the cookie banner, try disabling your AD Blocker.
  • If you accepted/declined the cookie banner and want it to reappear, you need to delete your cookies. To do that on Chrome, press F12 to open Developer Tools. Go to Application --> Storage --> Cookies, rightclick on the site you want to delete the cookies on and click clear.

Package Sidebar

Install

npm i @ubilabs/ubilabs-tracking

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

2.37 MB

Total Files

18

Last publish

Collaborators

  • aemkei
  • pwambach
  • mrmetalwood
  • usefulthink
  • theamazingpt
  • rich_pb
  • ubilabs-bot