Files
mintel.me/apps/web/next.config.mjs
Marc Mintel 2038b8fe47
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🧪 QA (push) Failing after 1m18s
Build & Deploy / 🏗️ Build (push) Failing after 2m58s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
feat(analytics): implement advanced tracking with script-less smart proxy
- Added Umami Smart Proxy route handler
- Refactored Umami adapter to use proxy-based fetch
- Implemented TrackedButton, TrackedLink, and ScrollDepthTracker
- Integrated event tracking into ContactForm
- Enhanced Analytics component with manual pageview and performance tracking
2026-02-16 23:03:42 +01:00

41 lines
1.0 KiB
JavaScript

import withMintelConfig from "@mintel/next-config";
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: 'standalone',
images: {
loader: 'custom',
loaderFile: './src/utils/imgproxy-loader.ts',
},
async rewrites() {
const umamiUrl =
process.env.UMAMI_API_ENDPOINT ||
process.env.UMAMI_SCRIPT_URL ||
process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL ||
"https://analytics.infra.mintel.me";
const glitchtipUrl = process.env.SENTRY_DSN
? new URL(process.env.SENTRY_DSN).origin
: "https://errors.infra.mintel.me";
return [
// Umami proxy rewrite removed in favor of app/stats/api/send/route.ts
{
source: "/errors/:path*",
destination: `${glitchtipUrl}/:path*`,
},
];
},
async redirects() {
return [
{
source: '/case-studies/klz',
destination: '/case-studies/klz-cables',
permanent: true,
},
];
},
};
export default withMintelConfig(nextConfig);