Open a tracking window
Starts watching a post's views and engagement. Zernio fetches the numbers from the platform itself on its
regular analytics sync, so every reading is verified: it is a value we read from the platform, never one
the creator or the caller reported. The window runs for trackingDays (30 by default, 90 at most) and
ends with one final read, after which the post.tracking_completed webhook fires. Identify the post
with postId (an external post id from Zernio), or with accountId together with the post's url.
Opening a window for a post that is already tracked returns the existing window with 200. A new
window returns 201. Requires the Analytics add-on.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.analytics.openTrackingWindow({ body: { postId: 'post_abc123', accountId: 'account_abc123', url: 'https://example.com', },});console.log(data);{ "window": { "id": "string", "postId": "string", "accountId": "string", "platform": "string", "platformPostId": "string", "startsAt": "2019-08-24T14:15:22Z", "endsAt": "2019-08-24T14:15:22Z", "status": "open", "finalReadAt": "2019-08-24T14:15:22Z", "completionReason": "final_read", "requestedBy": "string", "latest": { "views": 0, "likes": 0, "comments": 0, "shares": 0, "saves": 0, "syncedAt": "2019-08-24T14:15:22Z" } }}List tracking windows
Lists the tracking windows you can see, newest first. Each window carries the latest verified numbers we read from the platform. Requires the Analytics add-on.
Run a Google Analytics (GA4) realtime report
Activity on a connected GA4 property in the last 30 minutes (up to 60 for Analytics 360), through Google's `runRealtimeReport`. Not cached. Only realtime dimensions and metrics are accepted, e.g. `country`, `unifiedScreenName` with `activeUsers`.