add analytics
This commit is contained in:
@@ -35,7 +35,6 @@ 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", {
|
||||
ad_storage: "granted",
|
||||
ad_user_data: "granted",
|
||||
|
||||
@@ -14,5 +14,7 @@ import "vanilla-cookieconsent/dist/cookieconsent.css";
|
||||
import { run } from "vanilla-cookieconsent";
|
||||
import { config } from "~/CookieConsentConfig";
|
||||
|
||||
document.documentElement.classList.add("cc--darkmode");
|
||||
|
||||
run(config);
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@ import Footer from "./_components/Footer.astro";
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="pt-br" class="cc--darkmode">
|
||||
<html lang="pt-br">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
@@ -20,11 +20,10 @@ import Footer from "./_components/Footer.astro";
|
||||
|
||||
<script
|
||||
is:inline
|
||||
type="text/partytown"
|
||||
src="https://www.googletagmanager.com/gtag/js?id=G-G2989LF493"
|
||||
></script>
|
||||
|
||||
<script is:inline type="text/partytown">
|
||||
<script is:inline>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
@@ -40,8 +39,6 @@ import Footer from "./_components/Footer.astro";
|
||||
|
||||
gtag("config", "G-G2989LF493");
|
||||
</script>
|
||||
|
||||
<script is:inline data-category="analytics"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user