betterplace-cookies-banner
v1.4.4
Published
cookie banner for our websites
Downloads
23
Readme
betterplace-cookies-banner
Installation
yarn add betterplace-cookies-banner
Usage
Do this in webpacked JS:
import BetterplaceCookiesBanner from 'betterplace-cookies-banner'
Then either call it right away ...
new BetterplaceCookiesBanner()
... or assign it to window
and instantiate it somewhere else, e.g. in a layout file.
The constructor can be passed an options argument.
new BetterplaceCookiesBanner({
acceptCallback: initGoogleAnalyticsFunction,
link: 'http://my-custom-privacy-doc.com', // only used if no text given
showInIframe: true, // default: false
showUntilAccepted: false, // default: true
text: 'My custom banner text', // should include a privacy doc link
})
NOTE: The banner is currently shown even for doNotTrack=1
, overriding the behavior of cookies-eu-banner.
Development
Install development / runtime dependencies:
yarn
Preview:
open preview.html
Release a new version:
yarn publish