mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Add analytics
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%sveltekit.head%
|
||||
<script async defer src="https://www.googletagmanager.com/gtag/js?id=G-Q2R5PQL59Z"></script>
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
import "$lib/analytics"
|
||||
@@ -0,0 +1,9 @@
|
||||
(<any>window).dataLayer = (<any>window).dataLayer || [];
|
||||
|
||||
export function gtag(...args: any[]) {
|
||||
(<any>window).dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-Q2R5PQL59Z');
|
||||
Reference in New Issue
Block a user