Facebook Marketing API - How to get number of app installs

Digital Marketing Facebook Marketing API 3 years ago

3.07K 1 0 0 0

_x000D_ _x000D_ I am using the Marketing API, the Insights Edge specifically, to retrieve the data of our campaigns. https://developers.facebook.com/docs/marketing-api/insights/v2.4 The problem is that I do not see the field for knowing how many app installs the ad has generated. I see "clicks, impressions, reach" fields but nothing about the number of downloads from the stores. Is there a way to know that? This is available in the Facebook Ads dashboard but I do not see any way to get that value from the API. Thanks for any help!! require_once(__DIR__ . "/config/config.php"); include_once(__DIR__ . "/inc/helpers.php"); require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Api; use FacebookAds\Object\AdAccount; use FacebookAds\Object\AdCampaign; use FacebookAds\Object\Values\InsightsPresets; $access_token = readFromFile(__DIR__ . "/auth/token.txt"); // Initialize a new Session and instanciate an Api object Api::init($app_id, $app_secret, $access_token); // The Api object is now available trough singleton $api = Api::instance(); $account = new AdAccount('act_' . $ads_account_id); $campaigns = $account->getAdCampaigns(array( \FacebookAds\Object\Fields\AdCampaignFields::ID, \FacebookAds\Object\Fields\AdCampaignFields::NAME, ) ); foreach ($campaigns as $campaign) { //echo $campaign->{\FacebookAds\Object\Fields\AdCampaignFields::ID}.PHP_EOL; $campaign_insights = new AdCampaign($campaign->{\FacebookAds\Object\Fields\AdCampaignFields::ID}); $params = array( 'date_preset' => InsightsPresets::YESTERDAY, /* 'time_range' => array( 'since' => '2015-08-03', 'until' => '2015-08-03' ), */ 'filtering' => array( [ 'field' => 'campaign.objective', 'operator' => 'IN', 'value' => ["MOBILE_APP_INSTALLS"] ] ) ); $insights = $campaign_insights->getInsights(array( 'reach', 'impressions', 'clicks', 'call_to_action_clicks', 'total_actions', 'spend' ), $params);

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_ After trying every possibile field, I have found out that it's inside the "actions" field. Thanks
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 ?