add ga
This commit is contained in:
parent
77416f635a
commit
b8864011f5
@ -5,6 +5,7 @@ import { ClientProviders } from "./client-provider";
|
|||||||
import { Toaster } from "@/components/ui/sonner"
|
import { Toaster } from "@/components/ui/sonner"
|
||||||
import { ResolvingMetadata } from "next";
|
import { ResolvingMetadata } from "next";
|
||||||
import { getSiteConfigs } from "@/lib/fetchers";
|
import { getSiteConfigs } from "@/lib/fetchers";
|
||||||
|
import Script from "next/script";
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
variable: "--font-geist-sans",
|
variable: "--font-geist-sans",
|
||||||
@ -34,6 +35,23 @@ export default async function RootLayout({
|
|||||||
<body
|
<body
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased h-screen`}
|
className={`${geistSans.variable} ${geistMono.variable} antialiased h-screen`}
|
||||||
>
|
>
|
||||||
|
<Script
|
||||||
|
id="ga-gtag"
|
||||||
|
src={`https://www.googletagmanager.com/gtag/js?id=G-KHRH95GZFS`}
|
||||||
|
strategy="beforeInteractive"
|
||||||
|
/>
|
||||||
|
<Script
|
||||||
|
id="ga-gtag-config"
|
||||||
|
strategy="beforeInteractive"
|
||||||
|
>
|
||||||
|
{`
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'G-KHRH95GZFS');
|
||||||
|
`}
|
||||||
|
</Script>
|
||||||
<ClientProviders>
|
<ClientProviders>
|
||||||
{children}
|
{children}
|
||||||
</ClientProviders>
|
</ClientProviders>
|
||||||
|
|||||||
@ -554,7 +554,7 @@ export function MapComponent({
|
|||||||
op: "ui.interaction",
|
op: "ui.interaction",
|
||||||
name: "Colorbar Drag Start",
|
name: "Colorbar Drag Start",
|
||||||
},
|
},
|
||||||
(span) => {
|
(span: any) => {
|
||||||
span.setAttribute("colorbar.position.x", colorbarPosition.x);
|
span.setAttribute("colorbar.position.x", colorbarPosition.x);
|
||||||
span.setAttribute("colorbar.position.y", colorbarPosition.y);
|
span.setAttribute("colorbar.position.y", colorbarPosition.y);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user