Browse developer documentation
Websites
Get tracking script
Retrieve an installation snippet for the actual website and its saved privacy choices.
/api/v1/sites/{site}/scriptAccess: OAuth analytics:read + sites:write · workspace owner/admin · Permission details
Replace {site} with a real website ID or domain from List websites.
Query parameters
| Field | Type | Description |
|---|---|---|
format | string | Installation format. Values: html, gtm, nextjs, astro, nuxt, jsx, gatsby, docusaurus, drupal. Default: |
Request examples
Examples run from your server or terminal. Configure ATTRIBOO_TOKEN privately for authenticated requests. Replace example website IDs and values with your own. The examples make real requests when you run them.
curl "https://www.attriboo.com/api/v1/sites/site_example/script?format=html" \
-H "Authorization: Bearer $ATTRIBOO_TOKEN"Response
Illustrative response. Fields below are inside the data object. Optional coverage, notes and continuation fields vary by report.
| 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. |
{
"status": "success",
"data": {
"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."
}
}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.