Modulify

Turn visitor analytics on or off

set_analytics_enabled

Turns visitor analytics collection on or off for a site, reaching visitors only once the site is published again.

Scopesites:writeMakes changes

Turning it off stops new visitors being counted, but a live site keeps collecting until it is published again. Existing history is untouched either way. The response carries analyticsEnabled with the setting as it now stands.

The tool tells the client to reach for it when you ask to stop tracking, and always to tell you about the publish step, because otherwise you would believe collection stopped when it has not. Any member of the workspace can change it, and it makes no analytics lookup. See Collection.

Inputs

Input Type Required Description
projectId string Yes The site id.
enabled boolean Yes True to collect visitors, false to stop.