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