# Installing the script

Source: https://analytics.5h3ll.site/docs/installation

Script attributes, frameworks, single-page apps and troubleshooting.

The script is small, loads with `defer` and sets no third-party cookies. It records page views automatically, including navigation in single-page apps.

## Frameworks

```
<script defer data-website-id="YOUR_WEBSITE_ID" src="https://analytics.5h3ll.site/js/script.js"></script>
```

## Script attributes

| Attribute | What it does |
| --- | --- |
| `data-website-id` | Required. Your website ID. |
| `data-consent="required"` | Waits for visitor consent before tracking. See Consent. |
| `data-domain` | Cookie domain, to share a visitor across subdomains (for example .example.com). |
| `data-api` | Send events to a different endpoint, for example your own proxy. |
| `data-allow-localhost` | Track on localhost. Off by default so development does not pollute data. |

## Troubleshooting

- Check the browser Network tab for a request to `/api/event`. A blocked request usually means an ad blocker or a content security policy.
- If you use a content security policy, allow `https://analytics.5h3ll.site` for `script-src` and `connect-src`.
- Visits from localhost are ignored unless you add `data-allow-localhost`.
- The domain must match one of the domains configured for the website.

Previous

Quickstart

Next

Goals and custom events

Something missing or wrong? [Open a support ticket](https://analytics.5h3ll.site/support).
