Delete all visitor analytics
clear_site_analytics
Permanently deletes the entire visitor history of a site, with no export taken first.
Every visitor, pageview and source ever recorded is erased and cannot be recovered. It needs the Delete projects permission in the workspace, so an ordinary member cannot run it, and unlike deleting a site there is no exemption for whoever created it.
Collection normally carries on, so new visitors start filling an empty history straight away. If the call reports a failure, treat the history as already gone and publish the site again, because a half-finished clear can leave the site unregistered and collecting nothing.
The tool tells the client never to call it to tidy up, only when you have asked for exactly this. It makes no analytics lookup. See Danger zone.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |