fix
This commit is contained in:
@@ -35,17 +35,17 @@ export const config: CookieConsentConfig = {
|
|||||||
onAccept: () => {
|
onAccept: () => {
|
||||||
console.log("ga4 accepted");
|
console.log("ga4 accepted");
|
||||||
|
|
||||||
window.dataLayer = window.dataLayer || [];
|
// window.dataLayer = window.dataLayer || [];
|
||||||
function gtag(...args: any[]) {
|
// function gtag(...args: any[]) {
|
||||||
window.dataLayer.push(args);
|
// window.dataLayer.push(args);
|
||||||
}
|
// }
|
||||||
|
|
||||||
gtag("consent", "update", {
|
// gtag("consent", "update", {
|
||||||
ad_storage: "granted",
|
// ad_storage: "granted",
|
||||||
ad_user_data: "granted",
|
// ad_user_data: "granted",
|
||||||
ad_personalization: "granted",
|
// ad_personalization: "granted",
|
||||||
analytics_storage: "granted",
|
// analytics_storage: "granted",
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
onReject: () => {
|
onReject: () => {
|
||||||
console.log("ga4 rejected");
|
console.log("ga4 rejected");
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ interface Props extends HeadProps {}
|
|||||||
dataLayer.push(arguments);
|
dataLayer.push(arguments);
|
||||||
}
|
}
|
||||||
gtag("js", new Date());
|
gtag("js", new Date());
|
||||||
gtag("consent", "default", {
|
// gtag("consent", "default", {
|
||||||
ad_storage: "denied",
|
// ad_storage: "denied",
|
||||||
ad_user_data: "denied",
|
// ad_user_data: "denied",
|
||||||
ad_personalization: "denied",
|
// ad_personalization: "denied",
|
||||||
analytics_storage: "denied",
|
// analytics_storage: "denied",
|
||||||
});
|
// });
|
||||||
|
|
||||||
gtag("config", "GTM-N3F7P9ZB");
|
gtag("config", "GTM-N3F7P9ZB");
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user