mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 13:39:57 -04:00
Move code for deleting old cookies into banner JS
Removes the following cookies: - seen_cookie_message (flags if banner was already shown) - _gid (Google Analytics cookie) - _ga (Google Analytics cookie) These were set by default before so potentially still around for some users. The code for this now exists as a static method on the cookieMessage module and is called when the JS loads for the first time.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
window.GOVUK.Frontend.initAll();
|
||||
|
||||
$(() => GOVUK.addCookieMessage());
|
||||
window.GOVUK.Modules.CookieBanner.clearOldCookies();
|
||||
|
||||
if (window.GOVUK.hasConsentFor('analytics')) {
|
||||
window.GOVUK.initAnalytics();
|
||||
|
||||
Reference in New Issue
Block a user