What changes when analytics knows about money
A typical Next.js SaaS has a marketing site, a pricing page, an auth flow and a dashboard. Page-view tools can tell you that /pricing got 3,000 visits. They cannot tell you that visitors who landed on one particular blog post later paid, while the busiest page produced nobody. Connecting your payment provider closes that gap.
- See revenue per landing page, not just visits
- See which referrer and UTM campaign the buyers came from
- Spot the page where signups leak, with funnels on Growth
Pass the visitor to Stripe Checkout
Payment Links are attributed automatically. If your server creates Checkout sessions, send the visitor ID from the browser and set it on the session:
Signups and identify
Any submitted form with an email field identifies the visitor. If you sign people in with OAuth or magic links, there is no form, so call window.obsidesk?.identify(user.email, user.name) once the session is known, for example in a client component that runs after login. Password and payment fields are never read.
Ad blockers and your own domain
Some blockers stop third-party analytics. You can serve the script from your own domain with a rewrite in next.config.js and point data-api at the proxied endpoint. The docs have the exact snippet.
Running next to Vercel Analytics
The two do not conflict. Vercel Analytics is built into the platform and is a good fit for deployment-level traffic; Obsidesk adds revenue, attribution and signups. If you are weighing them, read the Vercel Analytics comparison.
Things to know
- Server components are unaffected: the script runs in the browser only.
- Visits on localhost are ignored unless you add
data-allow-localhost. - Open
https://yoursite.com/#obsidesk-ignoreonce per browser to exclude yourself. - The page and Web Vitals views need the Growth plan; traffic, MRR and attribution are on Starter.
A practical setup for a typical Next.js SaaS
- Put the script in
app/layout.tsx(orpages/_app.tsx) so every route is covered, including the marketing pages that bring in visitors. - Connect your payment provider under Settings, then Revenue, so payments appear next to the visits that produced them.
- Call
identifyafter sign-in if you use OAuth, so the same person is recognized across visits. - Add
data-obsidesk-eventattributes to your key buttons, such as the pricing and upgrade calls to action. - Pass
window.obsidesk?.idto Checkout sessions you create on the server.
What you will not get
Obsidesk is not a replacement for server-side logging or error tracking, and it does not read your Next.js build or serverless functions. It is a browser script plus read-only revenue connections. If a visitor blocks scripts entirely, they will not appear, which is why proxying through your own domain is worth considering.
Why teams pick a script over a heavy SDK
A script that weighs about 4 KB, uses no cookies and needs no provider wrapper is easy to reason about in a Next.js build. There is nothing to configure per route, nothing to hydrate on the server and nothing to remove if you change your mind. Removing it is one line.