Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Merge branch 'main' into posthog

Steven Tey4f1e1d1ae2c4
diff --cc apps/web/app/layout.tsx
index 49cb528cdb,043823536e..ae39055a05
--- a/apps/web/app/layout.tsx
+++ b/apps/web/app/layout.tsx
@@@ -1,7 -1,12 +1,11 @@@
import { inter, satoshi } from "@/styles/fonts";
import "@/styles/globals.css";
+ import { Analytics as DubAnalytics } from "@dub/analytics/react";
+ import { TooltipProvider } from "@dub/ui/src/tooltip";
import { cn, constructMetadata } from "@dub/utils";
- import RootProviders from "./providers";
-import { SpeedInsights } from "@vercel/speed-insights/next";
+ import { AxiomWebVitals } from "next-axiom";
+ import { Toaster } from "sonner";
+
export const metadata = constructMetadata();
export default function RootLayout({
@@@ -12,7 -17,19 +16,18 @@@
return (
<html lang="en" className={cn(satoshi.variable, inter.variable)}>
<body>
- <RootProviders>{children}</RootProviders>
+ <AxiomWebVitals />
+ <TooltipProvider>
+ <Toaster closeButton className="pointer-events-auto" />
+ {children}
+ <DubAnalytics
+ cookieOptions={{
+ domain: process.env.NEXT_PUBLIC_VERCEL_ENV
+ ? `.${process.env.NEXT_PUBLIC_APP_DOMAIN}`
+ : undefined,
+ }}
+ />
- <SpeedInsights />
+ </TooltipProvider>
</body>
</html>
);
diff --cc apps/web/next.config.js
index 8e0a5b258b,d59318eb8e..bea310628e
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@@ -206,17 -208,4 +208,17 @@@ module.exports = withAxiom(
},
];
},
+ async rewrites() {
+ return [
+ // for posthog proxy
+ {
+ source: "/_proxy/ingest/static/:path*",
+ destination: "https://us-assets.i.posthog.com/static/:path*",
+ },
+ {
+ source: "/_proxy/ingest/:path*",
+ destination: "https://us.i.posthog.com/:path*",
+ },
+ ];
+ },
- };
+ });