Ours Privacy Integration with Bolt.new
Step-by-step guide to integrate Ours Privacy, built for HIPAA-regulated workflows, with an app built in Bolt.new to track page views and custom events.
This guide covers adding Ours Privacy tracking to an app built with Bolt.new, an AI app builder that generates a full project you can edit and publish directly from the browser.
Integration Options
The guide below covers pasting the Ours Privacy Web SDK snippet directly into your project's HTML entry point.
For a no-code approach, use the Ours Privacy Tag Manager instead.
Steps to Integrate Ours with Bolt.new
1. Add the Web SDK snippet
- Copy your install snippet from the Install Ours page.
- In the Bolt.new editor, open
index.htmlat the project root. - Paste the snippet inside the
<head>section, before the closing</head>tag.
<!-- index.html -->
<head>
<!-- Ours Pixel Code -->
<script>
// your install code is here
</script>
<!-- End Ours Pixel Code -->
</head>Important: Bolt.new publishes the last saved version of your files. Save
index.htmlbefore clicking Publish, or the previous version ships without the snippet.
The Web SDK tracks page views automatically, both on initial load and on subsequent client-side route changes, so no additional routing code is required.
2. Publish and verify
- Save your changes and click Publish.
- Visit the published site and open the browser console to check for script errors.
- In your Ours account, check Recent Events to confirm page views are coming through.
Track Custom Events
Call window.ours('track', ...) from any component's event handler:
function SignUpButton() {
const handleClick = () => {
if (typeof window !== 'undefined' && window.ours) {
window.ours('track', 'ButtonClicked', { button_name: 'sign_up' });
}
};
return <button onClick={handleClick}>Sign Up</button>;
}Next Steps
- Web SDK reference: full list of tracking methods and options.
- Tag Manager: manage tags visually instead of editing code.
- Cookie Consent installation: add the consent banner so it loads before other tracking scripts.
If you need further assistance, contact us at support@oursprivacy.com.
How is this guide?

