How to add @dub/analytics to your React or Next.js site
@dub/analytics
to your project.<Analytics />
component to track conversions on your website.E.g. if you’re using Next.js, you can add the <Analytics />
component to your root layout component or any other pages where you want to track conversions.<Analytics />
component to customize its behavior:
first-click
: The first click model
gives all the credit to the first touchpoint in the customer journey.last-click
: The last click model gives all the credit to the last
touchpoint in the customer journey.domainsConfig.refer
instead] The Dub custom domain for
referral program client-side click tracking.?via=abc123
).