Skip to content

Commit 41bee5c

Browse files
committed
remove google analytic
1 parent 6794272 commit 41bee5c

6 files changed

+45
-8
lines changed

netlify.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build]
2+
command = "npm run build"
3+
publish = "build"

package-lock.json

+23
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
@@ -20,6 +20,7 @@
2020
"devDependencies": {
2121
"@playwright/test": "^1.47.2",
2222
"@sveltejs/adapter-auto": "^3.2.5",
23+
"@sveltejs/adapter-netlify": "^4.3.6",
2324
"@sveltejs/kit": "^2.6.1",
2425
"@sveltejs/vite-plugin-svelte": "^3.1.2",
2526
"@types/eslint": "^9.6.1",

src/routes/+layout.server.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ANALYTICS_ID } from '$env/static/private';
2-
/** @type {import('./$types').LayoutServerLoad} \*/
3-
export async function load () {
4-
return { ANALYTICS_ID };
5-
}
1+
// import { ANALYTICS_ID } from '$env/static/private';
2+
// /** @type {import('./$types').LayoutServerLoad} \*/
3+
// export async function load () {
4+
// return { ANALYTICS_ID };
5+
// }

src/routes/+layout.svelte

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import { onMount } from 'svelte';
44
import Runatics from './utils/Runatics.svelte';
55
export let data;
6-
const analyticsId = data.ANALYTICS_ID
6+
// const analyticsId = data.ANALYTICS_ID
7+
const analyticsId = '';
78
89
onMount(modeobserver);
910
</script>
10-
<Runatics {analyticsId} />
11+
<!-- <Runatics {analyticsId} /> -->
1112
<slot />

svelte.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ const config = {
1111
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1212
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1313
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
14-
adapter: adapter()
14+
adapter: adapter({
15+
// if true, will create a Netlify Edge Function rather
16+
// than using standard Node-based functions
17+
edge: false,
18+
19+
// if true, will split your app into multiple functions
20+
// instead of creating a single one for the entire app.
21+
// if `edge` is true, this option cannot be used
22+
split: false
23+
})
1524
}
1625
};
1726

0 commit comments

Comments
 (0)