added ga switch on cookie options
This commit is contained in:
@@ -17,11 +17,22 @@ const CookieBanner = () => {
|
||||
let expDate = new Date(now);
|
||||
|
||||
expDate.setDate(now.getDate() + 365);
|
||||
|
||||
console.log(expDate);
|
||||
cookie.set("planning_casework", true, {
|
||||
expires: expDate,
|
||||
});
|
||||
|
||||
let cookieStr = {
|
||||
"essential": "accepted",
|
||||
"usage": "accepted",
|
||||
"communications": "accepted",
|
||||
"settings": "accepted",
|
||||
};
|
||||
|
||||
cookie.set("CookiePolicy", JSON.stringify(cookieStr).toString(), {
|
||||
expires: expDate,
|
||||
path: "/",
|
||||
});
|
||||
|
||||
setBannerVisible(false);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user