data-version invalidates stored consent when your privacy policy changes.
When the library loads and finds a stored version that differs from data-version,
it deletes all consent cookies and re-shows the banner — even if the user had previously accepted.
data-version="1"cookieWarn.versiondata-version, all cookies are cleared and the banner re-appears<!-- Start with data-version="1"; bump to "2", "3" etc. when your privacy policy changes -->
<script
id="cookieScript"
data-version="1"
data-lang-en="{
'text': 'We updated our privacy policy. Please review your cookie preferences.',
'accept_text': 'Accept all',
'accept_selected_text': 'Save settings',
'reject_text': 'Necessary only',
'categories': {
'necessary': {'label': 'Necessary', 'description': 'Required for the site to function.', 'required': true},
'analytics': {'label': 'Analytics', 'description': 'Help us understand how visitors use the site.'},
'marketing': {'label': 'Marketing', 'description': 'Used for personalised ads and content.'}
}
}"
data-callback="cookieWarnCallback"
src="cookie-warn.min.js">
</script>
<!--
Cookies written on consent:
cookieWarn.categories = "necessary,analytics"
cookieWarn.version = "1"
cookieWarn.timestamp = "2025-05-21T10:00:00.000Z"
When data-version is bumped to "3":
stored version "2" != "3" → cookies cleared → banner re-appears
-->