@ubilabs/ubilabs-tracking
v1.1.1
Published
A cookie banner for Ubilabs demos
Downloads
2
Readme
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.