Browse developer documentation
Read-only tool
get_tracking_script
Retrieve an installation snippet for the actual website and its saved privacy choices.
Access: OAuth analytics:read sites:write, with current workspace owner/admin access. Workspace keys cannot use this tool.
Arguments
| Field | Type | Description |
|---|---|---|
format | string | Installation format. Values: html, gtm, nextjs, astro, nuxt, jsx, gatsby, docusaurus, drupal. Default: |
site | string | Website ID or domain. Required when the workspace has more than one website. |
Get tracking script
Use this JSON-RPC call through an initialized MCP client. Replace example values with your actual website, dates or confirmed setup details.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_tracking_script",
"arguments": {
"site": "site_example",
"format": "html"
}
}
}Decoded result
Illustrative JSON parsed from the result’s text block.
{
"site": "site_example",
"domain": "shop.example.com",
"format": "html",
"script": "<script defer data-auto-identify=\"false\" data-consent=\"required\" data-site-id=\"site_example\" src=\"https://www.attriboo.com/t.js\"></script>",
"preferences": {
"mode": "standard",
"consent": "required",
"captureEmails": false,
"visitorEstimates": false
},
"installation_guide": "https://www.attriboo.com/docs/installation",
"next": "Install once using the matching platform guide. Publish the change, respect the site's consent setup, then check received activity. The snippet contains no private API key."
}Result fields
| Field | Type | Description |
|---|---|---|
site | string | Website ID. |
domain | string | Website domain. |
format | string | Selected format. |
script | string | Complete snippet to install once. |
preferences | object | Saved mode, consent, captureEmails and visitorEstimates. |
installation_guide | string | Matching documentation entry point. |
next | string | Next installation step. |
The decoded data follows the get tracking script response contract, without the REST envelope.
Full MCP result wrapper
{
"content": [
{
"type": "text",
"text": "{\n \"site\": \"site_example\",\n \"domain\": \"shop.example.com\",\n \"format\": \"html\",\n \"script\": \"<script defer data-auto-identify=\\\"false\\\" data-consent=\\\"required\\\" data-site-id=\\\"site_example\\\" src=\\\"https://www.attriboo.com/t.js\\\"></script>\",\n \"preferences\": {\n \"mode\": \"standard\",\n \"consent\": \"required\",\n \"captureEmails\": false,\n \"visitorEstimates\": false\n },\n \"installation_guide\": \"https://www.attriboo.com/docs/installation\",\n \"next\": \"Install once using the matching platform guide. Publish the change, respect the site's consent setup, then check received activity. The snippet contains no private API key.\"\n}"
}
]
}Behavior and limits
Path parameter site is a returned website ID or domain. Requires setup OAuth and workspace owner/admin access, even though this is a GET.
Use the exact returned script: attributes change with saved privacy choices. Publish the installation before verification.