# Ask for consent

Choose when visitors are asked, and tell the script what they answered.

Some countries require you to ask before saving an id in someone's browser. You are responsible for the notice on your site. We give you the controls. Ask a lawyer about your own case.

## Three settings

Find them in **Settings, then Script**.

| Setting | What happens |
|---|---|
| Ask first where the law says so | We wait for a yes in countries on our list. Elsewhere we start right away. If we don't know the country, we wait |
| Ask everyone | We wait for a yes from everyone |
| Don't ask | We never wait. Use this only if you are sure you may |

The countries on our list are the EU, Iceland, Liechtenstein, Norway, the UK, Switzerland and Brazil. A privacy lawyer must still approve this list before launch.

## Tell the script the answer

Call one of these from your cookie banner:

```js title="After a yes"
totems.consent('granted')
```

```js title="After a no, or when someone changes their mind"
totems.consent('denied')
```

A no removes the saved id and stops events from that browser.

## Banners we read by ourselves

The script also listens to Google Consent Mode, Cookiebot and OneTrust. You don't need to call anything if your site uses one of them.

## Without consent

- No cookie, no storage and no visitor id.
- No join between that click and a person.
- The link still sends people to your page.

## How to know it worked

Open your site in a private window. Before saying yes, no `tm_v` cookie or saved id should exist. After yes, it should.
