---
title: "Set tracking scripts"
method: PUT
path: "/papi/project/{projectId}/tracking"
---

# Set tracking scripts

`PUT /papi/project/{projectId}/tracking`

## Request

- Base URL: `https://api.websitepublisher.ai`
- URL: `https://api.websitepublisher.ai/papi/project/{projectId}/tracking`
- Auth: OAuth 2 (authorization code, authorization URL `https://api.websitepublisher.ai/dapi/oauth/authorize`, token URL `https://api.websitepublisher.ai/dapi/oauth/token`, scopes: `write`)

Set tracking scripts injected into every page. head_scripts in head, body_scripts before body close. Omit or null to clear.

## Path parameters

- `projectId` integer, required

## Request body

- object
  - `head_scripts` string: Scripts in head (GTM, Analytics)
  - `body_scripts` string: Scripts before body close (pixels, chat)

## Response `200`

Scripts updated

---

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