Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to break down insights by day via Facebook api

I want to get the daily insights data so I try to use the below edge to request record by record (day by day). If there is data for 30 days, I have to request 30 times.

/insights?fields=impressions,social_clicks,website_clicks,ctr&time_range={'since':'2015-01-01','until':'2015-01-01'}

But if I can break down by using the edge such as the below one, I would not have to request many times.

/insights?fields=impressions,social_clicks,website_clicks,ctr&breakdowns=DAY

Do you know how to break down the insights by day?

like image 714
Nooni Avatar asked Dec 01 '15 11:12

Nooni


People also ask

How do I get Facebook Page insights on graph API?

You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.

How do you view insights on Facebook?

Tap Pages, then go to your Page. Tap More at the top of your Page, then tap Insights. To see more insights or to export insights, log into Facebook from a computer. Insights provide information about your Page's performance, like demographic data about your audience and how people are responding to your posts.

How do I track Facebook metrics?

In Facebook Insights, the metrics can be found in the Content tab. And in Creator Studio, overall engagement numbers are found in the Insights tab while post-level ones are in the Published tab.


1 Answers

You can select how to break in days using a parameter, for getting daily info just use the parameter time_increment parameter with value 1.

/insights?fields=impressions,social_clicks,website_clicks,ctr&time_range={'since':'2015-01-01','until':'2015-01-30'}&time_increment=1

Reference: https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights/

like image 141
Dulio Matos Leite Avatar answered Sep 28 '22 11:09

Dulio Matos Leite