OverviewProductsPlatformsAPI ReferenceResources

Analytics

Read the daily impressions, clicks, spend and conversions Zernio syncs from Microsoft Ads for an ad, with CTR, CPC and CPM.


Zernio syncs impressions, clicks, spend, conversions and revenue per ad and day from Microsoft's ad performance report, and derives CTR, CPC and CPM from them.

Read ad analytics

Call GET /v1/ads/{adId}/analytics with the ad's id (Get ad analytics).

TypeScript
const { data: insights } = await zernio.adinsights.getAdAnalytics({
  path: { adId: '6ae0968fa23091cc35b72121' },
  query: { fromDate: '2027-01-04', toDate: '2027-01-11' }
});

console.log(insights.analytics.summary.spend);

Response (200), trimmed:

JSON
{
  "ad": { "id": "6ae0968fa23091cc35b72121", "name": "Planner launch", "platform": "microsoft", "status": "active", "currency": "USD" },
  "analytics": {
    "summary": { "spend": 31.8, "impressions": 4260, "clicks": 187, "ctr": 4.39, "cpc": 0.17, "cpm": 7.46 },
    "daily": [ { "date": "2027-01-04", "spend": 4.5, "impressions": 610, "clicks": 26 } ]
  }
}

GET /v1/ads/tree rolls the same metrics up per campaign and ad group (Get campaign tree).

How it behaves

  • Metrics come from Microsoft's report, which Zernio requests and reads back for each sync, so a new day appears after the next sync rather than in real time.
  • Microsoft closes its reporting day on Pacific time, so the current Pacific day is the last one a sync can read.
  • An ad that never served, such as a paused one, returns an empty daily list.

If it fails

ErrorCauseFix
404The adId is not a Zernio ad idUse the id from GET /v1/ads, not the Microsoft ad id.
Empty dailyThe ad had no impressions in the rangeWiden the date range, or check the ad is running.
Was this page helpful?

On this page