Unable to match engagement metrics

api

#1

We are building a platform in which our clients are able to see their twitter account stats/metrics. The clients will be comparing the info available on ads.twitter.com for their accounts (https://ads.twitter.com/user/CLIENT_NAME/tweets) with our dashboard. These should match up very closely.

I want to compare impressions and engagement data on a per day basis for a given account. I have retrieved the time series engagement data (by hour) for the whole history of an account. Basically, it boiled down to sending requests such as

https://ads-api.twitter.com/1/stats/accounts/18ce54gzgbo?entity=ORGANIC_TWEET&entity_ids=8u94t&start_time=2017-05-19&end_time=2017-05-26&granularity=HOUR&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT

for all the account tweets, changing start_time and end_time so that the tweet’s whole history is included (I have done it in batches of 20 tweets). Important note: I have retrieved data only for organic tweets. This way I got to a point in which the values that we have for Impressions, and those shown on the ads.twitter.com/user/CLIENT_NAME/tweets main graph, are the same/close.

The Problem

I get totally different results when I try to compare values for engagements that we got via the API with those on the Engagement Rate, Likes, Retweets, etc. graphs.

Note:
Perhaps not totally relevant, but good to know: when I compare impressions and engagements values for individual tweets, they are ok (same/close). The problem only appears when I try to sum them up at the account level.

Another approach

I’ve also tried retrieving account level data using requests such as:

twurl -H "https://ads-api.twitter.com" "/1/stats/accounts/18ce54gzgbo?entity_ids=18ce54gzgbo&entity=ACCOUNT&granularity=DAY&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&start_time=2017-10-01T00:00:00-07:00&end_time=2017-10-08T00:00:00-07:00" | jq
{
  "data_type": "stats",
  "time_series_length": 7,
  "data": [
    {
      "id": "18ce54gzgbo",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            "impressions": [
              0,
              0,
              0,
              1949,
              2957,
              2986,
              6965
            ],
            "follows": [
              0,
              0,
              0,
              0,
              5,
              0,
              1
            ],
            "retweets": [
              0,
              0,
              0,
              0,
              2,
              0,
              7
            ],
            "likes": [
              0,
              0,
              0,
              0,
              2,
              4,
              9
            ],
            "engagements": [
              0,
              0,
              0,
              26,
              46,
              75,
              345
            ],
            "replies": [
              0,
              0,
              0,
              0,
              0,
              0,
              1
            ]
          }
        }
      ]
    }
  ],
  "request": {
    "params": {
      "start_time": "2017-10-01T07:00:00Z",
      "segmentation_type": null,
      "entity_ids": null,
      "end_time": "2017-10-08T07:00:00Z",
      "country": null,
      "placement": "ALL_ON_TWITTER",
      "granularity": "DAY",
      "entity": "ACCOUNT",
      "platform": null,
      "metric_groups": [
        "ENGAGEMENT"
      ]
    }
  }
}

However, these number (all of them) differ widely from what I see on the ads.twitter.com page (look at ‘0,0,0,…’ impressions).

Changing ‘placement’ value to ‘PUBLISHER_NETWORK’ (or adding this up with ‘ALL_ON_TWITTER’) didn’t produce correct values.

Questions

I don’t know what/if I’m doing something wrong or whether my assumptions about the data retrieved are wrong.

I guess there are a few questions here:

  1. How are these metrics (available on the graph) calculated? What fields are included in calculating them?
  2. Is it possible to get the same engagement numbers by using data from the ‘organic_tweet’ request I have mentioned above? Or do I need to call a different endpoint to get that?

Help greatly appreciated.