# The analytics mode for one visitor

`POST /compliance/center/analytics-rules/decide` · Rivier · compliance

The analytics mode for one visitor: region, browser signals, consent and the site's own setting go in; the mode, the reason and whether a prompt is needed come out.

- Scope: compliance:read
- Mcp: rivier_compliance_analytics_decide
- Graphql: Query.complianceAnalyticsRulesDecide
- Sdk: compliance.analyticsRules.decide
- Cli: compliance analytics rules decide

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "country": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 2,
          "maxLength": 2
        },
        {
          "type": "null"
        }
      ]
    },
    "subdivision": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4
        },
        {
          "type": "null"
        }
      ]
    },
    "signals": {
      "type": "object",
      "properties": {
        "gpc": {
          "type": "boolean"
        },
        "dnt": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "consent": {
      "type": "string",
      "enum": [
        "none",
        "granted",
        "denied"
      ]
    },
    "ownerMode": {
      "type": "string",
      "enum": [
        "M0",
        "M1",
        "M2"
      ]
    },
    "childAudience": {
      "type": "boolean"
    }
  },
  "required": [
    "consent",
    "ownerMode"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/compliance/center/analytics-rules/decide' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "consent": "none",
  "ownerMode": "M0"
}'
```
