mirror of
https://github.com/LukeHagar/LukeHagar.com.git
synced 2025-12-06 04:20:17 +00:00
Vitals I think
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@ node_modules
|
||||
!.env.example
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
.vercel
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = () => {
|
||||
return { env: import.meta.env, analyticsId: process.env.VERCEL_ANALYTICS_ID };
|
||||
return { analyticsId: process.env.VERCEL_ANALYTICS_ID };
|
||||
};
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
import { page } from '$app/stores';
|
||||
|
||||
export let data: PageData;
|
||||
console.log(data);
|
||||
const { analyticsId } = data;
|
||||
|
||||
inject();
|
||||
|
||||
// $: if (browser && analyticsId) {
|
||||
// webVitals({
|
||||
// path: $page.url.pathname,
|
||||
// params: $page.params,
|
||||
// analyticsId,
|
||||
// });
|
||||
// }
|
||||
$: if (browser && analyticsId) {
|
||||
webVitals({
|
||||
path: $page.url.pathname,
|
||||
params: $page.params,
|
||||
analyticsId
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- App Shell -->
|
||||
|
||||
Reference in New Issue
Block a user