# How do I measure my site without cookies and still attribute revenue?

Use a first-party visitor ID instead of third-party cookies. DataFast's script keeps an opaque ID in the browser's local storage for 30 days (or session storage with data-storage="session"), stores no personal data and sets no cookies. Pass the ID through checkout so payments can be matched to the first source. Check your own legal obligations.

## Steps

1. **Install the script.** <script defer src="https://datafast.app/js/script.js" data-website-id="YOUR_SITE_ID"></script>
2. **Choose the storage.** Default: 30-day local storage. Add data-storage="session" to end attribution with the browser session.
3. **Pass the ID to checkout.** Use data-datafast-checkout on hosted checkout links or window.datafast.visitorId in your own flow.

## Limits

- This is not legal advice: whether you need consent depends on your jurisdiction and how you use the data.
- Blockers and cleared storage break attribution for those visitors.

## FAQ

**Does the script set cookies?**
No. It uses browser storage for an opaque ID.

**What is stored about visitors?**
See the privacy policy at /privacy.

Canonical page: https://datafast.app/solutions/privacy-friendly-analytics-without-cookies
