> ## Documentation Index
> Fetch the complete documentation index at: https://85b42a7-productmetrics.manicule.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://85b42a7-productmetrics.manicule.dev/docs/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://85b42a7-productmetrics.manicule.dev/docs/api/mcp.
> Every agent surface: https://85b42a7-productmetrics.manicule.dev/docs/.well-known/llms-manifest.json

# Set the cookie consent manager and tracking features (/docs/api/stores-and-tracking/tracking-update-installation-features)

<!-- agent-signals: reading_time_min: 3 · est_tokens: 2176 · updated: 2026-11-16 -->
Related: [Connect a store](/docs/api/stores-and-tracking/stores-connect.md), [New WooCommerce setup token](/docs/api/stores-and-tracking/stores-create-woocommerce-setup-claim.md), [Choose the store platform](/docs/api/stores-and-tracking/stores-select-platform.md), [Assign a store to a property](/docs/api/stores-and-tracking/tracking-assign-property.md), [Track a website](/docs/api/stores-and-tracking/tracking-create-website-installation.md), [Get store connections](/docs/api/stores-and-tracking/tracking-get-commerce-configuration.md)

> Sets which cookie consent manager (CMP) an installation's tracking script follows, together with its other script features.

`PUT https://prod-backend.productmetrics.io/api/public/v1/companies/{companyId}/tracking/installations/{installationId}/features`

**Scope** `setup` · **Access** Changes data · **Operation id** `tracking.update_installation_features`

## Try it

`productmetrics` runs after `productmetrics login`; curl needs `PM_TOKEN` (see [Authentication](/docs/api/overview#authentication)). Set `$COMPANY_ID`, `$INSTALLATION_ID` first.



**productmetrics CLI:**

```bash
productmetrics tracking update-installation-features \
  --company-id $COMPANY_ID \
  --installation-id $INSTALLATION_ID \
  --identity-discovery \
  --dynamic-checkout-observation \
  --cmp-adapter shopify_customer_privacy \
  --expanded-bot-signals \
  --server-authoritative-attribution-mode off \
  --json
```

**curl:**

```bash
curl -X PUT "https://prod-backend.productmetrics.io/api/public/v1/companies/$COMPANY_ID/tracking/installations/$INSTALLATION_ID/features" \
  -H "Authorization: Bearer $PM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "identityDiscovery": true,
    "dynamicCheckoutObservation": true,
    "cmpAdapter": "shopify_customer_privacy",
    "expandedBotSignals": true,
    "serverAuthoritativeAttributionMode": "off"
  }'
```

## Response

API response (200):

```json
{
  "data": {
    "installation_id": "6f1c2a7e-3b4d-4e8f-9a01-2c3d4e5f6a7b",
    "desired_revision": 1
  },
  "request_id": "req_01JA9N485VRTD7Z7GT5NT3400R"
}
```

**CLI output:** `productmetrics tracking update-installation-features --json` prints `{ "ok": true, "data": …, "request_id": "…" }` with the same `data`.

## Before you call

`cmpAdapter` is the consent manager the website uses: `shopify_customer_privacy`, `onetrust`, `cookiebot`, `usercentrics` or `osano`, or null when the website has none; tracking then follows the visitor's choice in that banner. The other fields: `identityDiscovery`, `dynamicCheckoutObservation`, `expandedBotSignals` (booleans) and `serverAuthoritativeAttributionMode`. Every field is required and replaces the stored value, so read the installation's current `featureFlags` first ([`tracking.get_configuration`](/docs/api/stores-and-tracking/tracking-get-configuration) or [`tracking.get_commerce_configuration`](/docs/api/stores-and-tracking/tracking-get-commerce-configuration), `installations[].featureFlags`), change only what the person asked for, and send all of them back. `pageviewPolicy` may be sent back with them; it is ignored and stays as stored. Needs editor or admin access. Answers the installation id and the new configuration revision, which the tracking script picks up once it is published; read [`tracking.get_configuration`](/docs/api/stores-and-tracking/tracking-get-configuration) again to check it.

## Path parameters

| Name             | Type          | Description                                                                                                                                                                                                                                    |
| ---------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `companyId`      | string (uuid) | Your workspace id, from `productmetrics whoami` or [`properties.list`](/docs/api/account/properties-list) (`company_id`).                                                                                                                           |
| `installationId` | string (uuid) | The tracking installation: `installationId` from [`tracking.get_commerce_configuration`](/docs/api/stores-and-tracking/tracking-get-commerce-configuration) or [`tracking.get_configuration`](/docs/api/stores-and-tracking/tracking-get-configuration). |

## Body

| Name                                 | Type         | Required | Description                                                                                                                                                                                                                                                                                                              |
| ------------------------------------ | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `identityDiscovery`                  | boolean      | Yes      | The other fields: `identityDiscovery`, `dynamicCheckoutObservation`, `expandedBotSignals` (booleans) and `serverAuthoritativeAttributionMode`.                                                                                                                                                                           |
| `dynamicCheckoutObservation`         | boolean      | Yes      | The other fields: `identityDiscovery`, `dynamicCheckoutObservation`, `expandedBotSignals` (booleans) and `serverAuthoritativeAttributionMode`.                                                                                                                                                                           |
| `cmpAdapter`                         | enum or null | Yes      | `cmpAdapter` is the consent manager the website uses: `shopify_customer_privacy`, `onetrust`, `cookiebot`, `usercentrics` or `osano`, or null when the website has none; tracking then follows the visitor's choice in that banner. One of `shopify_customer_privacy`, `onetrust`, `cookiebot`, `usercentrics`, `osano`. |
| `expandedBotSignals`                 | boolean      | Yes      | The other fields: `identityDiscovery`, `dynamicCheckoutObservation`, `expandedBotSignals` (booleans) and `serverAuthoritativeAttributionMode`.                                                                                                                                                                           |
| `serverAuthoritativeAttributionMode` | enum         | Yes      | The other fields: `identityDiscovery`, `dynamicCheckoutObservation`, `expandedBotSignals` (booleans) and `serverAuthoritativeAttributionMode`. One of `off`, `shadow`, `fixed`, `rolling`.                                                                                                                               |
| `pageviewPolicy`                     | enum         | No       | `pageviewPolicy` may be sent back with them; it is ignored and stays as stored. One of `on_change`, `always`.                                                                                                                                                                                                            |

## Errors

A failure answers with its HTTP status and `{ error: { code, message, details? }, request_id }`. Branch on `code` (stable, lower_snake); show `message` to the person. The CLI prints the same `error` with `"ok": false`.

```json
{
  "error": {
    "code": "insufficient_scope",
    "message": "This operation needs the setup scope; connect again and allow it.",
    "details": {
      "required_scope": "setup"
    }
  },
  "request_id": "req_01JX9N4C7PP318JTB7NZZK328X"
}
```

| Status | Code                 | When                                                                                                                      |
| ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| 400    | `invalid_request`    | A path, query or body value does not match this page. `details.issues` lists each `location`, `path` and `message`.       |
| 401    | `invalid_token`      | The token is missing, expired or revoked: sign in again (`productmetrics login`). The `WWW-Authenticate` header says why. |
| 403    | `insufficient_scope` | The token lacks the `setup` scope (`details.required_scope`): sign in again and allow it.                                 |
| 404    | `not_found`          | An id in the path does not exist, or the signed-in person cannot open it.                                                 |
| 429    | `rate_limited`       | More than 600 requests a minute for this person: wait the `Retry-After` seconds (60) and retry.                           |

[All Stores and tracking operations](/docs/api/stores-and-tracking)
