Framework Guides

Ours Privacy Integration with Replit

Step-by-step guide to integrate Ours Privacy, built for HIPAA-regulated workflows, with an app built and deployed on Replit to track page views and custom events.

This guide covers adding Ours Privacy tracking to an app built with Replit, a browser-based IDE and hosting platform with an AI Agent that generates and edits your project's actual code.

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 Replit

1. Add the Web SDK snippet

  1. Copy your install snippet from the Install Ours page.
  2. In the Replit file editor, open your project's index.html (or the root HTML template if you're using a framework).
  3. 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>

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. Deploy and verify

  1. Deploy your project from the Deployments tab.
  2. Visit the deployed site and open the browser console to check for script errors.
  3. In your Ours account, check Recent Events to confirm page views are coming through.

Track Custom Events

Call ours('track', ...) from any event handler:

<button onclick="ours('track', 'ButtonClicked', { button_name: 'sign_up' });">Sign Up</button>

Next Steps

If you need further assistance, contact us at support@oursprivacy.com.

How is this guide?

On this page