Browse developer documentation
Get a tracking snippet
attriboo sites script
Retrieve a real website's snippet with its saved tracking and consent choices.
Access: OAuth analytics:read sites:write; workspace owner/admin
Options
| Field | Type | Description |
|---|---|---|
--siteRequired | string | Website ID or domain from sites list. |
--format | string | Snippet format. Values: html, gtm, nextjs, astro, nuxt, jsx, gatsby, docusaurus, drupal. Default: |
--json | boolean | Compact JSON instead of formatted JSON. |
--csv | boolean | CSV for the main row collection; nested values remain JSON cells. Cannot be combined with --json. |
Print the installation snippet
Replace example websites, dates and cursor values with your own. Running these commands makes real requests or changes the local session.
attriboo sites script --site shop.example.com --format htmlExample output
<script defer data-auto-identify="false" data-consent="required" data-site-id="site_example" src="https://www.attriboo.com/t.js"></script>Inspect snippet metadata as JSON
Replace example websites, dates and cursor values with your own. Running these commands makes real requests or changes the local session.
attriboo sites script --site shop.example.com --format html --jsonExample output
{"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."}Output 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 data follows the get tracking script API contract. CLI JSON omits the REST envelope.
Behavior and limits
Without --json or --csv, this command prints only the script string. --json returns the full site, domain, format, script, preferences, installation_guide and next fields.
Install the exact snippet once using the matching platform guide. This command does not edit or deploy your website.