Skip to content

Commit

Permalink
Add analytics (#98)
Browse files Browse the repository at this point in the history
* Add vercel analytics

* Add vercel speed insights
  • Loading branch information
franknoirot authored Jan 11, 2024
1 parent c3338fd commit 8c18f04
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"@threlte/core": "^6.1.0",
"@threlte/extras": "^7.3.0",
"@types/core-js": "^2.5.8",
"@vercel/analytics": "^1.1.1",
"@vercel/speed-insights": "^1.0.2",
"core-js-pure": "^3.35.0",
"object.groupby": "^1.0.1",
"svelte-autosize": "^1.1.0",
Expand Down
6 changes: 6 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<script lang="ts">
import 'styles/app.css'
import { dev } from '$app/environment'
import { inject } from '@vercel/analytics'
import { injectSpeedInsights } from '@vercel/speed-insights/sveltekit'
injectSpeedInsights()
inject({ mode: dev ? 'development' : 'production' })
</script>

<slot />
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,18 @@
"@typescript-eslint/types" "6.8.0"
eslint-visitor-keys "^3.4.1"

"@vercel/analytics@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-1.1.1.tgz#2a712378a95014a548b4f9d2ae1ea0721433908d"
integrity sha512-+NqgNmSabg3IFfxYhrWCfB/H+RCUOCR5ExRudNG2+pcRehq628DJB5e1u1xqwpLtn4pAYii4D98w7kofORAGQA==
dependencies:
server-only "^0.0.1"

"@vercel/speed-insights@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@vercel/speed-insights/-/speed-insights-1.0.2.tgz#1bebf3e7c7046b6a911721233b263b69214ddb3e"
integrity sha512-y5HWeB6RmlyVYxJAMrjiDEz8qAIy2cit0fhBq+MD78WaUwQvuBnQlX4+5MuwVTWi46bV3klaRMq83u9zUy1KOg==

"@vitest/[email protected]":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.1.3.tgz#9667719dffa82e7350dcca7b95f9ec30426d037e"
Expand Down Expand Up @@ -3372,6 +3384,11 @@ semver@^7.5.3, semver@^7.5.4:
dependencies:
lru-cache "^6.0.0"

server-only@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e"
integrity sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==

set-cookie-parser@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz#131921e50f62ff1a66a461d7d62d7b21d5d15a51"
Expand Down

0 comments on commit 8c18f04

Please sign in to comment.