Releases: 68publishers/cookie-consent
v0.3.6
v0.3.5
Added
- Added the section
How the GTM integration works
in README - Added the section
How to update already published container
in README
Changed
- The original plugin is initialized directly if the DOM is loaded or inside a callback attached to an event
document.DOMContentLoaded
instead ofwindow.load
.
v0.3.4
❗ Possible BC break if you are using an event CookieConsentWrapper.on('init', ...)
Removed
- Removed argument
wrapper
for an eventinit
. Callbacks for the event now have no arguments now, please use directlyCookieConsentWrapper
inside a callback function.
Why?
Internally event callbacks are stored in a "temporary" CookieConsentWrapper
object if the wrapper is not currently available e.g. the script cookie-consent.min.js
is not fully downloaded by a browser but you attaching some event callback.
At this point, the GTM can't provide the argument wrapper
into your callback because Template's code is sandboxed JavaScript, and custom objects like CookieConsentWrapper
instance are not supported by this sandbox so undefined
is passed as the argument instead of the wrapper.
How to modify your events
Simply call the wrapper directly inside a callback function. So instead of this:
CookieConsentWrapper.on('init', function (wrapper) {
# the wrapper argument is now undefined
wrapper.unwrap();
});
Use this:
CookieConsentWrapper.on('init', function () {
CookieConsentWrapper.unwrap();
});
v0.3.3
v0.3.2
Added
- Added the section
Accessing the wrapper in the JavaScript
in the README - Added the section
Cookies options
in the README - Added the field
Enable cookies auto-clear
in GTM template under the sectionCookies options
. - Added the field
Cookies auto-clear strategy
in GTM template under the sectionCookies options
. - Added the field
Cookie names
in GTM template under the sectionCookies options
. - Added implementation of cookies auto-clear based on mentioned fields.
Changed
- Updated a code in the GTM template - temporary object
window.CookieConsentWrapper
is created before the real wrapper is created by an external script. This allows attaching events through the methodCookieConsentWrapper.on()
before the script is downloaded by a browser. - Moved fields
Cookie name
andCookie expiration
under the new sectionCookies options
. - Moved the field
Settings modal trigger selector
under the sectionSettings modal options
.
v0.3.1
v0.3.0
❗ GTM template is not back-compatible with previous versions including a beta version (0.3.0-beta.x
), the template must be updated in your container.
Added
- Added param table
Event triggers
in a new sectionComposite consent
in GTM template. Event triggers for composite consent can be defined here. For more information look into the section Event triggers based on composite consent in README.
Changed
- Options for the wrapper are now accessible under a single global variable
window.cc_wrapper_config
instead of multiple smaller variables (GTM template must be updated). - Modified regex validation rule for GTM field
Package version
. The regex now allows beta and alpha versions.