Skip to content

Commit 15fc6e9

Browse files
==
=
authored and
=
committed
Remove docker, add vercel analytics
1 parent 995406d commit 15fc6e9

File tree

7 files changed

+31
-86
lines changed

7 files changed

+31
-86
lines changed

.dockerignore

-12
This file was deleted.

.github/workflows/ci.yml

-40
This file was deleted.

Dockerfile

-14
This file was deleted.

package-lock.json

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"type": "module",
3030
"dependencies": {
3131
"@sveltejs/adapter-vercel": "^5.3.0",
32+
"@vercel/analytics": "^1.2.2",
3233
"lodash.throttle": "^4.1.1"
3334
}
3435
}

src/lib/Components/Head.svelte

-20
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
<script lang="ts">
2-
import { PUBLIC_GTAG_KEY } from '$env/static/public';
3-
import { onMount } from 'svelte';
4-
5-
onMount(() => {
6-
window.dataLayer = window.dataLayer || [];
7-
8-
function gtag(...args: any) {
9-
window.dataLayer.push(arguments);
10-
}
11-
12-
gtag('js', new Date());
13-
gtag('config', PUBLIC_GTAG_KEY);
14-
});
15-
</script>
16-
171
<svelte:head>
182
<meta name="author" content="Ivan Semochkin" />
193
<meta
@@ -60,8 +44,4 @@
6044
/>
6145

6246
<meta name="theme-color" content="#22192B" />
63-
64-
{#if PUBLIC_GTAG_KEY}
65-
<script async src="https://www.googletagmanager.com/gtag/js?id={PUBLIC_GTAG_KEY}"></script>
66-
{/if}
6747
</svelte:head>

src/routes/+layout.svelte

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<script lang="ts">
2+
import { dev } from '$app/environment';
23
import Head from '$lib/Components/Head.svelte';
34
import '../app.css';
45
import { theme } from '$lib/stores/theme';
6+
import { inject } from '@vercel/analytics';
7+
8+
inject({ mode: dev ? 'development' : 'production' });
59
</script>
610

711
<Head />

0 commit comments

Comments
 (0)