When using Next.js Dynamic Routes (setup found here and just below), /_vercel/insights/* does not seem to get included in the build, thus the analytics scripts aren't running.
Setup: /app/[slug]/page.tsx
Notice the usage of notFound() and generateStaticParams() that likely disable generated routes that aren't included in the fetched data, including /_vercel/*
When using Next.js Dynamic Routes (setup found here and just below),
/_vercel/insights/*
does not seem to get included in the build, thus the analytics scripts aren't running.Setup:
/app/[slug]/page.tsx
Notice the usage of
notFound()
andgenerateStaticParams()
that likely disable generated routes that aren't included in the fetched data, including /_vercel/*Local dev (no issue):
after
npm run build
: