window.getWpGA4Cookie = function(name) {
match = document.cookie.match(new RegExp(name + '=([^;]+)'));
if (match) return decodeURIComponent(match[1].replace(/\+/g, ' ')) ;
};
window.ga4AllowServices = false;
var isCookieRestrictionModeEnabled = 0,
currentWebsiteId = 2,
cookieRestrictionName = 'user_allowed_save_cookie';
if (isCookieRestrictionModeEnabled) {
allowedCookies = window.getWpGA4Cookie(cookieRestrictionName);
if (allowedCookies !== undefined) {
allowedWebsites = JSON.parse(allowedCookies);
if (allowedWebsites[currentWebsiteId] === 1) {
window.ga4AllowServices = true;
}
}
} else {
window.ga4AllowServices = true;
}
The store will not work correctly in the case when cookies are disabled.