Sites

Toggle visitor analytics for a site

Persists the owner preference and re-publishes the KV record so the worker starts or stops injecting the analytics script (and recording beacons) on the next request.

patch/sites/{id}/analytics-enabled

Request

  • Base URL: https://api.nippy.host
  • URL: https://api.nippy.host/sites/{id}/analytics-enabled
  • Auth: bearer (a scheme the document does not define)

Path parameters

idstring required

Site UUID

Request body

analyticsEnabledboolean required

When true, the worker injects the analytics script and records pageview/engagement beacons for the site. When false, analytics is turned off on the next request.

Response

idstring required

Site UUID

analyticsEnabledboolean required

Whether visitor analytics is enabled for this site.

Changes

No recorded changes to this operation across all 1 revision of this API.