betterplace-cookies-banner
Installation
yarn add betterplace-cookies-banner
Usage
Do this in webpacked JS:
Then either call it right away ...
... or assign it to window
and instantiate it somewhere else, e.g. in a layout file.
The constructor can be passed an options argument.
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