Feature/purpose localization, cookie banner style intro
Features:
- "Cookie banner" style introduction page (opens up to full modal when "Learn more" is clicked)
- Fetching localized purpose and feature lists in user's consent language (if available)
- Add gdprInScope CMP command so the caller can tell exactly when and why the CMP was either shown or not shown
Fixes:
- Fix for the metadata field in the getVendorConsents CMP command
- Bugfixes for the command queue and errors being thrown if the scripts are included in the head of the HTML
- Update pubconsent cookie to be compliant with the IAB specification
- Updated documentation for how to queue commands up for publishers using the "cmp.complete.bundle.js" bundle
New config option:
layout: "footer"
If the publisher wants to use the cookie-banner style introduction instead of the modal, they should include this in their config. If they would like to use the standard modal style, then they do not need to specify any layout configuration.
New CMP commands:
(no arguments are needed for either of these commands to work)
gdprInScope
returns an object that has information as to these five things:
- Has the cmp been shown yet? (if there's a cookie already and the cmp doesn't need to show, this will be false)
- Has consent been submitted?
- Is the CMP setup to always show regardless of location/language?
- Is the CMP showing because of language?
- Is the CMP showing because of location?
decodeMetadata
decodes the metadata string from the getVendorConsents
command.