# Install the tracking tag

Put Zernio's tracking tag on your website: one click on a connected store or a Google Tag Manager container, or one line pasted into the page.

There are three ways to put the tag on a website. All of them end in the same site, with the same ad accounts and the same checks.

## Install on a connected store

Connect the store, then open **Ads**, **Conversions**, **Sources** and click **Turn on** next to it. Zernio installs the tag through the store's own app.

| Store | How the tag goes in |
|---|---|
| <PlatformName slug="shopify" /> | Zernio's Shopify pixel, which also reports product views, carts, checkouts and purchases |
| <PlatformName slug="wordpress" page="commerce" label="WooCommerce" /> | A widget on the WordPress site |
| <PlatformName slug="wix" /> | A site script |
| <PlatformName slug="webflow" /> | Custom code, live after you next publish the site |

A store has one site. Turning it on again shows the one it already has.

On Shopify, the pixel captures the store's own events. Only the purchase reaches your ad platforms; the rest feed your traffic and funnel:

| Shopify event | Captured as | Sent to ad platforms |
|---|---|---|
| Page viewed | `PageView` | No |
| Product viewed | `ViewContent` | No |
| Product added to cart | `AddToCart` | No |
| Search submitted | `Search` | No |
| Checkout started | `InitiateCheckout` | No |
| Payment info submitted | `AddPaymentInfo` | No |
| Checkout completed | `Purchase`, with the order id | Yes |

On WooCommerce, Wix and Webflow, the tag records page views. Send purchases with [`zernio('track', 'Purchase', …)`](/products/server-side-tracking/script#track-an-event).

## Install with Google Tag Manager

For a site whose tags live in Google Tag Manager, connect Tag Manager and pick the container. Zernio adds a Custom HTML tag named **Zernio tracking** on all pages and publishes it.

Zernio works in its own **Zernio** workspace, so it never touches your drafts. Publish or discard any unpublished changes in the container first.

## Paste the line

Any other site takes one line before `</head>`, on every page. Enter the site's address under **Any other website** and click **Get the line**.

```html
<script async src="https://edge.zernio-edge.com/z.js?s=zs_4kq9x2mzt7b1c8v3n5p6r0wa"></script>
```

If someone else edits the site, **Send to your developer** emails them the line and where it goes. **Your AI agent** copies a ready prompt for a coding agent.

## Install with the API

`POST /v1/tracking-sites` does the same as the button. Send `storeAccountId` for a connected store, or only `url` for any other site.

```bash
curl -X POST "https://zernio.com/api/v1/tracking-sites" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Idempotency-Key: 7f3c2a8e-1b4d-4c9a-9e2f-5a6b7c8d9e0f" \
  -H "Content-Type: application/json" \
  -d '{ "profileId": "66a1f0c2a4b9d3e8f1a2b3c4", "url": "https://brand.com" }'
```

```json
{
  "site": {
    "id": "6a2b3c4d5e6f7a8b9c0d1e2f",
    "profileId": "66a1f0c2a4b9d3e8f1a2b3c4",
    "name": "brand.com",
    "status": "active",
    "install": { "method": "snippet", "storeAccountId": null, "snippet": "<script async src=\"https://edge.zernio-edge.com/z.js?s=zs_4kq9x2mzt7b1c8v3n5p6r0wa\"></script>" },
    "storeOrders": false,
    "siteKey": "zs_4kq9x2mzt7b1c8v3n5p6r0wa",
    "domains": ["brand.com", "www.brand.com"],
    "customHostname": null,
    "consentMode": "eu_opt_in",
    "checks": [
      { "key": "script", "status": "pending", "detail": "Paste the line on your site. This ticks with the first visit.", "checkedAt": "2026-11-11T10:00:00.000Z" }
    ],
    "setup": { "status": "pending" },
    "createdAt": "2026-11-11T10:00:00.000Z",
    "updatedAt": "2026-11-11T10:00:00.000Z"
  }
}
```

Paste `install.snippet` into every page. Each entry in `checks` is one setup step: `script` for the install, then one per ad account.

## Remove a site

Open the site and click **Remove site**, or call `DELETE /v1/tracking-sites/{siteId}`. Collection stops at once and its events stop reaching your ad accounts.

Zernio takes the tag off a store or a Tag Manager container itself. On a site where you pasted the line, remove it afterwards.

## How it behaves

- **Allowed hosts.** A site accepts events from its domain and its `www.` host. A store also accepts its platform address, such as `brand.myshopify.com`. Add others with `PATCH /v1/tracking-sites/{siteId}`.
- **Content Security Policy.** A site with a CSP must allow `edge.zernio-edge.com`, or your [own subdomain](/products/server-side-tracking/custom-subdomain), in `script-src` and `connect-src`.
- **Rotating the key.** `POST /v1/tracking-sites/{siteId}/rotate-key` issues a new `siteKey`. The old one keeps working for 7 days while you replace the line.

## If it fails

| Error | Cause | Fix |
|---|---|---|
| `script` check stays `pending` | The line is not on the site yet, or Webflow is not published | Paste the line, or publish the Webflow site |
| 409 `store_already_tracked` | The store already has a site | Use the site in `details.siteId` |
| 409 `reconnect_required` | The store connection expired | Reconnect the store, then try again |
| 400 `store_not_supported` | The account is not a store Zernio can install on | Create the site with `url` and paste the line |
| Tag Manager: the container has unpublished changes | Zernio publishes a whole version | Publish or discard them in Tag Manager, then try again |
| Tag Manager: no free workspace | Tag Manager's free plan allows 3 workspaces | Delete a workspace you no longer use |

## Related

- [Choose the ad accounts](/products/server-side-tracking/ad-accounts)
- [Test and verify](/products/server-side-tracking/verify)
- [Use your own subdomain](/products/server-side-tracking/custom-subdomain)