# Consent for analytics

A step of the [Cloud application](https://gradus.kazet.blog/tree/cloud-application) tree on Gradus, in the Product area: Idea, users, decisions, feedback.

Page: https://gradus.kazet.blog/tree/cloud-application/step/analytics-consent

Ask before tracking when the analytics tool needs it: a fair banner, nothing sent before Allow and a privacy page that matches what really happens.

Usually comes after: [Product analytics](https://gradus.kazet.blog/tree/cloud-application/step/product-analytics).

## Prompt for your AI assistant

```
Read the analytics decision record in docs/decisions and the privacy page. Say whether the chosen tool sets cookies, stores anything on the device or sends personal data to another company, and whether the places where my users are require consent for that. If none of that applies, write why into the decision record and stop. Otherwise add a consent banner with Allow and Decline buttons of equal weight and a link to the privacy page, which does not cover the main content on a phone, can be reopened from the footer and withdraws consent as easily as it gave it, deleting the tool's cookies. Load nothing from the tool before Allow, or use its consent mode and say in the privacy page exactly what it sends before consent. Load it only on the production address, never in local development or on preview URLs, and allow its hosts in the Content Security Policy if there is one. Walk through Decline and Allow with the network panel open, check that the right requests and cookies appear and ask me to confirm the visit in the tool's realtime view. Then list the tool's own settings for retention, ad personalisation, signals and location detail, recommend the most private values, ask me to set them and to filter out my own visits, then make the privacy page state the same retention.
```

Every step of the tree: https://gradus.kazet.blog/tree/cloud-application/llms.txt
