Auto-add analytics line
setSiteAutoInjectTurn the automatic addition of the collect line to STATIC deployments on or off — the Analytics page’s own switch, on the same owned project. Requires confirmed: true, representing the human’s agreement to this exact change for this exact projectId: with it on, that one line is added to the root index.html of the next site Tofu publishes from the submitted source, so it loads a script from Tofu’s domain into that site’s visitors’ pages, and turning it off and deploying again removes it. A deployment Tofu has to build (a framework build, or a project whose preset is not confirmed yet) never gets the line whichever way the switch is set. Returns the counter’s new state: the key, the line, the switch and what the last deployment got. It never edits the files you uploaded, and it cannot change what a visitor’s page counts by itself.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"enabled": "<enabled>",
"confirmed": "<confirmed>"
},
"name": "setSiteAutoInject"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | Yes | ||
| confirmed | Yes | ||
| projectId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notice | Yes | ||
| siteKey | Yes | ||
| snippet | Yes | ||
| available | Yes | ||
| autoInject | Yes | ||
| lastInjection | Yes |