> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Activate Storefront Pixel

> Install the Shopify storefront tracking pixel, or repoint an existing one

Install the storefront tracking pixel on a connected Shopify store, or repoint an existing pixel at this account.

This is the step that turns on product views, cart activity, and browse abandonment - the data every browse-abandonment and cart-recovery sequence depends on. Run it before building those sequences: events start flowing on the next storefront visit, and nothing is backfilled for the period the pixel was off.

Idempotent. A pixel that is already installed and current returns `changed: false` without writing to the store.

Shopify only. Other providers return a `400`.

Requires an API key with the `integrations:manage` scope.

## Request

<ParamField path="id" type="string" required>
  Shopify integration ID, from [List
  Integrations](/api-reference/integrations/list).
</ParamField>

This endpoint takes no request body.

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/integrations/int_abc123/pixel" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response fields

<ResponseField name="changed" type="boolean">
  `false` when the pixel was already installed and reporting to this account.
</ResponseField>

<ResponseField name="created" type="boolean">
  `true` when a new pixel was installed on the store.
</ResponseField>

<ResponseField name="updated" type="boolean">
  `true` when an existing pixel was repointed at this account.
</ResponseField>

<ResponseField name="pixel" type="object">
  Pixel state after activation. Same shape as [Get Storefront
  Pixel](/api-reference/integrations/pixel-get).
</ResponseField>

<ResponseField name="dependentEvents" type="array">
  Event names this pixel enables.
</ResponseField>

## Permissions

If the store granted the app an older permission set, Shopify refuses the install and this endpoint returns a `400` naming the reconnect step. Reconnect Shopify from **Settings -> Integrations** in the dashboard to grant storefront tracking permissions, then retry.

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "integrationId": "int_abc123",
    "provider": "shopify",
    "shopDomain": "example.myshopify.com",
    "pixel": {
      "installed": true,
      "id": "gid://shopify/WebPixel/4124934472",
      "endpoint": "https://api.sequenzy.com/api/webhooks/commerce/shopify/comp_123/customer-events",
      "endpointCurrent": true,
      "configurationCurrent": true,
      "healthy": true,
      "error": null
    },
    "changed": true,
    "created": true,
    "dependentEvents": [
      "ecommerce.product_viewed",
      "ecommerce.collection_viewed",
      "ecommerce.search_submitted",
      "ecommerce.product_added_to_cart",
      "ecommerce.cart_started",
      "ecommerce.cart_cleared",
      "ecommerce.browse_abandoned",
      "ecommerce.cart_abandoned"
    ],
    "message": "Storefront pixel installed. On-site events start arriving on the next storefront visit; nothing is backfilled for visits that happened while it was off."
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Shopify refused to install the pixel because the app is missing the required storefront tracking permissions (ACCESS_DENIED: Access denied for webPixelCreate). Reinstall or reconnect Shopify from Settings -> Integrations in the dashboard to grant them, then retry."
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized"
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "API key is missing required scope: integrations:manage"
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "Integration not found"
  }
  ```
</ResponseExample>
