AnalyticsApi
Defined in: packages/sdk/src/resources/AnalyticsApi.ts:15
Composed SEO/GEO analytics + first-party traffic analytics. Both
methods accept a range (default “30d”) and the traffic endpoint
also takes an interval for timeline bucket granularity.
Extends
Section titled “Extends”Resource
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AnalyticsApi(
opts):AnalyticsApi
Defined in: packages/sdk/src/request.ts:93
Parameters
Section titled “Parameters”Returns
Section titled “Returns”AnalyticsApi
Inherited from
Section titled “Inherited from”Resource.constructor
Methods
Section titled “Methods”getSeo()
Section titled “getSeo()”getSeo(
websiteId,range?):Promise<AnalyticsSeoResponse>
Defined in: packages/sdk/src/resources/AnalyticsApi.ts:25
Composed SEO/GEO analytics — health-scan snapshot, GEO citation rate, Search Console metrics, citation-checklist progress, competitor diff activity, AI quota usage. Range defaults to “30d” on the server if omitted.
Auth: admin OR the website’s owning client (clients can see their own site’s analytics).
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
range?
Section titled “range?”AnalyticsRange = "30d"
Returns
Section titled “Returns”Promise<AnalyticsSeoResponse>
getTraffic()
Section titled “getTraffic()”getTraffic(
websiteId,range?,interval?):Promise<AnalyticsTrafficResponse>
Defined in: packages/sdk/src/resources/AnalyticsApi.ts:42
First-party traffic analytics — pageviews, sessions, avg dwell, bounce rate, timeline, top pages / referrers / countries / device classes, bot stats. Empty when the tracker hasn’t been installed in the site template yet.
interval controls timeline bucket granularity. “auto” (default)
picks based on range — hourly for 7d, daily for 30d, weekly for
90d/all.
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
range?
Section titled “range?”AnalyticsRange = "30d"
interval?
Section titled “interval?”AnalyticsInterval = "auto"
Returns
Section titled “Returns”Promise<AnalyticsTrafficResponse>