# Add Privatus Analytics to Webstudio

> Add privacy-friendly analytics to a Webstudio project with the global Custom Code field in Project settings, then publish.

1. Click the Webstudio logo and open **Project settings**.
2. In **General**, paste the snippet into **Custom Code**:

   ```html
   <script defer src="https://privatusstats.com/js/pa.js" data-site="pa_YOURSITEID" data-modules="engage,auto,vitals,clicks,ask"></script>
   ```

3. **Publish**.

**Custom Code** outputs in the head of every page, but it doesn't run in
the Builder, so editing your project adds no visits. A script that must
sit in the body goes into an HTML Embed instead.

Your Webstudio preview domain isn't one of your site's domains, so its hits
are dropped unless you add it as an
[additional domain](/docs/getting-started/add-a-site#more-settings-under-site-settings-general).
