Websites and builders
Bolt
Bolt.new analytics with Stickybeak tracks every route in a deployed app from one root script. Add it through Vite or Next.js in about five minutes.
Add the script
Open the root file
For Vite (
vite.config.ts), openindex.html. For Next.js (next.config.*), useapp/layout.tsx.Add the script
Place this before
</head>, or ask Bolt to do so exactly as written:<script defer data-site="YOUR_SITE_ID" data-domain="example.com" src="https://app.usestickybeak.com/_cfw/s.js" ></script>Deploy
Click Publish, or redeploy through your host.
Check it's working
Bolt's preview is not counted. Visit the deployed domain, then follow Check it's working.
Track goals
Add data-goal to the React element:
<button data-goal="signup">Create account</button>
For code events, initialise the queue in the root head before the tracker, then call it after success:
<script>window.stickybeak = window.stickybeak || function () { (window.stickybeak.q = window.stickybeak.q || []).push(arguments); };</script>
(window as any).stickybeak("signup", { plan: "free" });
See Custom goals.
Track purchases
In the payment-success handler, call (window as any).stickybeak("purchase", { revenue, currency, order_id }). See Revenue.
Page changes
Bolt's React routes change client-side. Stickybeak records those path changes automatically.
If it isn't working
- Check the root file contains one complete tag.
- Test the deployed domain, not Bolt preview.