Social Media

Get Tweet Engagement Metrics from Twitter API

Colin Dellow

Colin Dellow

Tracking user engagement with your social media activity is critical to understanding what kind of content is performing well and should be continued. Unfortunately, Twitter’s Engagement API is an enterprise-level offering, requiring a special contract with their sales team. Fortunately, you can use the regular Twitter API to achieve a similar result. This tutorial will walk you through how to get the impression count, profile visit count and link click count from your most recent tweets.

Get your Twitter User ID

You will need to translate your Twitter username from its handle form (eg SyncWithHQ) into its ID form (eg 1394672120425242628). We’ll use the users by username endpoint to do this in the form below. Give it a try, using your username:

Get Twitter User ID

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

id
name
username
   
   
   

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Get engagement metrics for your tweets

Using your user ID from the previous step, we’ll now make a call to the tweets by user ID endpoint. Because we are looking at tweets from your user account, we are able to fetch the non_public_metrics field, which has performance metrics like impressions, profile visits and link clicks. Paste your ID in the form below to get the performance of your most recent tweets:

Get Tweet Metrics for User

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

Tweet
Impressions
User Profile Clicks
Link Clicks
Tweet ID
     
     
     

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Now that you’ve got data per-tweet, you can use Google Sheets’s built-in spreadsheeting capabilities to roll up the number of impressions, visits, and link clicks into a single number for your entire account, using the SUM() function.