How to get the insights per campaign for multiple campaigns that belong to a specific ad account in a single call

Digital Marketing Facebook Marketing API 3 years ago

5.93K 1 0 0 0

_x000D_ _x000D_ We want to get the insights per campaign for multiple campaigns that belong to a specific ad account in a single call. I am using the following http call and it returns me the correct insights(reach, impressions and clicks) and other data per campaign for the last 30 days only. https://graph.facebook.com/v3.3//campaigns?fields=name,status,insights{reach,impressions,clicks}&access_token= How can I use the parameter date_preset so that I will be able to get the insights(reach, impressions and clicks) and other data per campaign for lifetime? If there is any other way to get the above insights for lifetime without using the date_preset please do not hesitate to advise me how to get them. We wanted to let you know that our app is written in php.

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago
_x000D_ Because insights is an edge of the campaign object you can apply some filter parameters via dot on that edge, like this: https://graph.facebook.com/v3.3//campaigns?fields=name,status,insights.date_preset(lifetime){reach,impressions,clicks}&access_token= Or, if you want to check Insights with the time breakdown (three months, for example) and also take a look on the lifetime summary you can do it like this: https://graph.facebook.com/v3.3//campaigns?fields=name,status,insights.default_summary(true).limit(3).date_preset(lifetime).time_increment(monthly){reach,impressions,clicks}&access_token= { "name": "Campaign Name", "status": "Campaign Status", "insights": { "data": [ { "reach": "149599", "impressions": "291917", "clicks": "13517", "date_start": "2019-01-11", "date_stop": "2019-01-31" }, { "reach": "265556", "impressions": "456458", "clicks": "7915", "date_start": "2019-02-01", "date_stop": "2019-02-28" }, { "reach": "233641", "impressions": "331600", "clicks": "4671", "date_start": "2019-03-01", "date_stop": "2019-03-31" } ], "paging": { "cursors": { "before": "BFR", "after": "AFT" }, "next": "next link" }, "summary": { "reach": "660772", "impressions": "1486924", "clicks": "32484", "date_start": "2019-01-11", "date_stop": "2019-05-06" } }, "id": "000" } https://developers.facebook.com/docs/marketing-api/insights/parameters#param
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum


Q

What are the best SEO tools for a personal website? What website or tools should I use to build and...

What are the best SEO tools for a personal website? What website or tools should I use to build and...
Q

Why is keyword research important?

Why is keyword research important?
Q

What is SEO ?

What is SEO ?