Websites and builders
Hashnode
Hashnode analytics with Stickybeak tracks a headless blog from its Next.js layout in about five minutes. Hosted Hashnode publications cannot run custom scripts, but you can measure their referrals.
Add the script
Open the headless layout
In Hashnode's Next.js starter, open
app/layout.tsxand add this inside<head>:<script defer data-site="YOUR_SITE_ID" data-domain="example.com" src="https://app.usestickybeak.com/_cfw/s.js" ></script>Deploy
Deploy the front end. On a hosted
hashnode.devor custom-domain publication, use UTM-tagged links to your tracked site instead.
Check it's working
Visit the deployed headless blog, then follow Check it's working.
Track goals
In the headless app, add data-goal to a link or button. Hosted publications can only send UTM-tagged referrals to your tracked site. See Custom goals.
Track purchases
Hashnode provides no purchase data. From a headless checkout success handler, send amount, currency and order ID using Revenue; otherwise track the checkout link.
Page changes
The headless Next.js app routes client-side. Stickybeak records path changes automatically.
If it isn't working
- Custom code works only in a headless front end you control.
- Hashnode Integrations accepts only named services.