Skip to main content

siteEnableAnalytics

Enables or disables Web Analytics for an editable site and returns the site. Enabling an already enabled site keeps its original enablement time; disabling clears it. Requests a tracking script refresh. Requires Web Analytics edit access.

siteEnableAnalytics(
siteId: Int!
enable: Boolean!
): Site!

Arguments​

siteEnableAnalytics.siteId ● Int! non-null scalar​

Site ID from sites.

siteEnableAnalytics.enable ● Boolean! non-null scalar​

True to enable Web Analytics; false to disable it.

Type​

Site object​

A site with derived activity/install status plus optional tracking and settings data normalized for GraphQL clients. Returned by site and sites.