fix
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import type { CookieConsentConfig } from "vanilla-cookieconsent";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
dataLayer: Record<string, any>[];
|
||||
gtag: (...args: any[]) => void;
|
||||
}
|
||||
}
|
||||
export const config: CookieConsentConfig = {
|
||||
guiOptions: {
|
||||
consentModal: {
|
||||
@@ -28,14 +34,18 @@ export const config: CookieConsentConfig = {
|
||||
'<a href="https://marketingplatform.google.com/about/analytics/terms/br/" target="_blank">Google Analytics 4</a>',
|
||||
onAccept: () => {
|
||||
console.log("ga4 accepted");
|
||||
/*
|
||||
window.gtag("consent", "update", {
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(...args: any[]) {
|
||||
window.dataLayer.push(args);
|
||||
}
|
||||
|
||||
gtag("consent", "update", {
|
||||
ad_storage: "granted",
|
||||
ad_user_data: "granted",
|
||||
ad_personalization: "granted",
|
||||
analytics_storage: "granted",
|
||||
});
|
||||
*/
|
||||
},
|
||||
onReject: () => {
|
||||
console.log("ga4 rejected");
|
||||
|
||||
Reference in New Issue
Block a user