Instagram impressions in the PubNio analytics API

PubNio returns no Instagram impressions. Post and account readings both come back unsupported with reason removed and replacedBy: "views", so ask for views. Without impressions there is no denominator, so post engagement_rate is unsupported too, with reason impressions_removed; account engagement_rate is not_exposed.

Instagram: LiveView as Markdown

What PubNio returns

MetricScopeInstagram fieldUnitCombines by
impressionspostnot returned: removed (use views)countsum
impressionsaccountnot returned: removed (use views)countsum
viewspostviewscountsum
viewsaccountviewscountsum
engagement_ratepostnot returned: impressions_removedratioratio
engagement_rateaccountnot returned: not_exposedratioratio

impressions: Times content was displayed, including repeat views.

views: Provider-defined content or video views.

engagement_rate: Engagement divided by impressions, 0 to 1.

How PubNio reads it

  • Post views is Meta's views media insight, which every placement's request includes. Account views is the daily views account insight, summed over the range.
  • The account read first asks for views, reach, profile_views, and website_clicks. If Meta rejects that as an invalid request, PubNio retries once without views, and the metrics it could not read come back pending with reason metric_rejected.
  • The replacement is declared in capabilities as replacedBy: "views" on both scopes, so an agent can switch metrics without reading this page.

Example

The capabilities endpoint answers without calling Instagram. Under the Instagram provider, these are its entries for impressions.

request.http
GET /api/v1/workspaces/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b/analytics/capabilities
Authorization: Bearer pn_live_***
response-excerpt-instagram-metrics.json
[
  {
    "key": "impressions",
    "scope": "post",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "unsupported",
    "supported": false,
    "reason": "removed",
    "replacedBy": "views"
  },
  {
    "key": "impressions",
    "scope": "account",
    "granularity": "day",
    "unit": "count",
    "aggregation": "sum",
    "availability": "unsupported",
    "supported": false,
    "reason": "removed",
    "replacedBy": "views"
  }
]

Limits

  • A metric Instagram does not report comes back with value: null and an availability state that says why. A post with no stored values whose last read failed on permissions, a rate limit, or a transient error answers with that error instead.