fixt
This commit is contained in:
@@ -35,12 +35,14 @@ export const config: CookieConsentConfig = {
|
|||||||
'<a href="https://marketingplatform.google.com/about/analytics/terms/br/" target="_blank">Google Analytics 4</a>',
|
'<a href="https://marketingplatform.google.com/about/analytics/terms/br/" target="_blank">Google Analytics 4</a>',
|
||||||
onAccept: () => {
|
onAccept: () => {
|
||||||
console.log("ga4 accepted");
|
console.log("ga4 accepted");
|
||||||
// window.gtag("consent", "update", {
|
/*
|
||||||
// ad_storage: "granted",
|
window.gtag("consent", "update", {
|
||||||
// ad_user_data: "granted",
|
ad_storage: "granted",
|
||||||
// ad_personalization: "granted",
|
ad_user_data: "granted",
|
||||||
// analytics_storage: "granted",
|
ad_personalization: "granted",
|
||||||
// });
|
analytics_storage: "granted",
|
||||||
|
});
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
onReject: () => {
|
onReject: () => {
|
||||||
console.log("ga4 rejected");
|
console.log("ga4 rejected");
|
||||||
|
|||||||
@@ -19,26 +19,19 @@ import Footer from "./_components/Footer.astro";
|
|||||||
</slot>
|
</slot>
|
||||||
|
|
||||||
<script
|
<script
|
||||||
|
data-category="analytics"
|
||||||
is:inline
|
is:inline
|
||||||
type="text/partytown"
|
type="text/partytown"
|
||||||
data-category="analytics"
|
|
||||||
src="https://www.googletagmanager.com/gtag/js?id=G-G2989LF493"
|
src="https://www.googletagmanager.com/gtag/js?id=G-G2989LF493"
|
||||||
></script>
|
></script>
|
||||||
|
|
||||||
<script is:inline type="text/partytown" data-category="analytics">
|
<script data-category="analytics" is:inline type="text/partytown">
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag() {
|
function gtag() {
|
||||||
dataLayer.push(arguments);
|
dataLayer.push(arguments);
|
||||||
}
|
}
|
||||||
gtag("js", new Date());
|
gtag("js", new Date());
|
||||||
|
|
||||||
// gtag("consent", "default", {
|
|
||||||
// ad_storage: "denied",
|
|
||||||
// ad_user_data: "denied",
|
|
||||||
// ad_personalization: "denied",
|
|
||||||
// analytics_storage: "denied",
|
|
||||||
// });
|
|
||||||
|
|
||||||
gtag("config", "G-G2989LF493");
|
gtag("config", "G-G2989LF493");
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user