pass matomo analytics env vars with zod

This commit is contained in:
2026-06-12 14:48:52 +02:00
parent 7384a3f825
commit ee9968e99b
3 changed files with 9 additions and 3 deletions
+3 -2
View File
@@ -1,9 +1,10 @@
import { trackAppRouter } from "@socialgouv/matomo-next";
import { useLocation, useSearch } from "@tanstack/react-router";
import { useEffect } from "react";
import { env } from "#/env.ts";
const MATOMO_URL = import.meta.env.NEXT_PUBLIC_MATOMO_URL;
const MATOMO_SITE_ID = import.meta.env.NEXT_PUBLIC_MATOMO_SITE_ID;
const MATOMO_URL = env.VITE_MATOMO_URL;
const MATOMO_SITE_ID = env.VITE_MATOMO_SITE_ID;
export function MatomoAnalytics() {
const location = useLocation();