Once you’ve set up your reverse proxy, don’t forget to update the apiHost parameter in the <Analytics /> component to point to your proxy URL.
Copy
import { Analytics as DubAnalytics } from "@dub/analytics/react";export default function App() { return ( <Layout> <DubAnalytics apiHost="/_proxy/dub" // the URL of your reverse proxy domainsConfig={{ refer: "go.example.com", // the custom domain you're using on Dub for your short links }} queryParam="via" // optional: query parameter to listen to for client-side click-tracking (default: "via") /> {/* Your app code here */} </Layout> );}
Once you’ve set up your reverse proxy, don’t forget to update the scriptProps.src parameter in the <Analytics /> component to point to your proxy URL.
Copy
import { Analytics as DubAnalytics } from "@dub/analytics/react";export default function App() { return ( <Layout> <DubAnalytics scriptProps={{ src: "/_proxy/dub/script.js", // pointing to your reverse proxy }} /> {/* Your app code here */} </Layout> );}