To add Obsidesk to an Astro site, paste the script tag in the head of your layout. It tracks visitors, referrers and campaigns on every page, detects form signups and, with a revenue source connected, shows which pages bring paying customers.
What you get
- Visitors, pages, referrers and UTM campaigns
- Signups from forms
- Revenue by landing page, ideal for content-led SaaS
- Custom events via an attribute with no JavaScript
- Cookieless tracking
Set it up
- 1Create your account and add your domain
Sign up, add the domain you want to track and copy your site ID from Settings. Every plan has a 14-day money-back guarantee; there is no free trial.
- 2Add the script to your layout
Open
src/layouts/Layout.astroand put the tag in<head>.<script defer src="https://obsidesk.com/script.js" data-site="YOUR_SITE_ID"></script>
- 3Build and deploy
Open your site in a normal browser window and check that the visit appears in the live view. Visits on localhost are not counted unless you add
data-allow-localhost, and your own visits can be excluded by opening#obsidesk-ignoreonce. - 4Tag important links with an event
No JavaScript needed.
<a href="/pricing" data-obsidesk-event="Hero CTA">See pricing</a>
Content sites and docs
Astro is popular for blogs, docs and marketing sites. Joining those pages to revenue shows which article or doc page brings customers rather than just readers. Pair it with Search Console to see which keywords lead to revenue.
Static output
Astro ships static HTML by default, so the script tag sits in every built page with no runtime to configure. Add it once in the shared layout and every page inherits it.
FAQ
How do I add analytics to an Astro site?
Paste the Obsidesk script tag into <head> in your Astro layout.
Can I see which blog posts bring paying customers?
Yes. Connect a revenue source and the landing-page view shows revenue per page.
Does it set cookies?
No. It uses local storage for a random ID, no cookies. See the cookieless analytics guide.
Works with
Connect Astro in about a minute.
14-day money-back guarantee. Installed in 30 seconds. Read-only revenue connections.