---
title: "Turn on server-side tracking for a website"
method: POST
path: "/v1/tracking-sites"
tags: ["Conversions"]
---

# Turn on server-side tracking for a website

`POST /v1/tracking-sites`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/tracking-sites`
- Auth: HTTP bearer

Creates a tracking site. With `storeAccountId`, Zernio installs its tag on the connected Shopify, WordPress (WooCommerce), Wix or Webflow store. With only `url`, paste the returned `install.snippet` into the site.

The ad accounts you picked for each connection get a forwarding rule, so website conversions reach them at once. `checks` shows each step; `setup.status` turns `ready` when all have passed.

## Headers

- `Idempotency-Key` string, required

## Request body

- union
  - object
    - `profileId` string, required
    - `storeAccountId` string, required: A Shopify, WordPress, Wix or Webflow account connected to the profile.
    - `url` string, uri: The store's public address, when it differs from the one the store reports.
  - object
    - `profileId` string, required
    - `url` string, uri, required: The website, such as `https://brand.com`. A bare domain also allows its `www.` host.

## Response `201`

Site created.

- object
  - `site` TrackingSite
    - `id` string
    - `profileId` string
    - `name` string
    - `status` 'active' | 'paused' | 'removing'
    - `install` object
      - `method` 'shopify' | 'wordpress' | 'wix' | 'webflow' | 'snippet': How the tag is installed. `snippet` means you paste it.
      - `storeAccountId` string, nullable
      - `snippet` string: The script tag to paste, already pointing at the custom subdomain once it is active.
    - `storeOrders` boolean: True when the store's orders reach Zernio from the store itself, so website purchases are forwarded but not counted twice.
    - `siteKey` string: Public key that names the site in the snippet, such as `zs_...`.
    - `domains` string[]
    - `customHostname` object, nullable
      - `hostname` string
      - `status` 'pending' | 'active' | 'failed'
      - `dnsRecord` object
        - `type` 'CNAME'
        - `name` string: The record name relative to your domain, such as `t`.
        - `target` string
    - `consentMode` 'eu_opt_in' | 'opt_in' | 'opt_out': How a visitor with no consent signal is treated. `eu_opt_in` (default): no consent in the EU, UK and other countries that require it, consent elsewhere. `opt_in`: no consent anywhere. `opt_out`: consent everywhere.
    - `checks` object[]: One per setup step: `script` for the install, then one per ad account the site sends to, keyed by its platform and ids.
      - `key` string
      - `status` 'pending' | 'passed' | 'failed'
      - `detail` string, nullable: What to do when the check has not passed.
      - `checkedAt` string, date-time
    - `setup` object
      - `status` 'pending' | 'ready' | 'failed': `failed` when any check failed, `ready` when all passed.
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400`: Invalid body, an unsupported store (code `store_not_supported`) or a store with no known address (code `store_url_unknown`).
- `401`: Missing or invalid API key. `code` is `missing_credentials` when no Authorization header was sent and `invalid_credentials` when the key is unknown, revoked or expired.
- `404`: Resource not found
- `409`: The store already has a site (code `store_already_tracked`, with `details.siteId`) or is disconnected (code `reconnect_required`).

## Changes

- **2026-11-16** `427c3183f40f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/tracking-sites/post.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) - [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/f8abaf18031e?raw)
