# Add Privatus Analytics to Framer

> Add cookieless analytics to a Framer site through custom code, track single-page navigation automatically and count clicks with a data-privatus-event attribute.

1. Open your project and go to **Site settings → General → Custom code**.
2. Paste the snippet into **End of `<head>` tag**:

   ```html
   <script defer src="https://privatusanalytics.com/js/pa.js" data-site="pa_YOURSITEID"></script>
   ```

3. **Publish**.

Framer sites are single-page apps: page changes use `history.pushState`,
which the tracker follows automatically.

Your `*.framer.app` preview domain isn't one of your site's domains, so its
hits are dropped unless you add it.

## Events

Add a custom attribute in Framer (**Link → Custom attributes**, or through
a code override) named `data-privatus-event` to track clicks without code.
