Facebook Marketing API and Conversion Insight

Digital Marketing Facebook Marketing API 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ Please can you tell me how to get 7d_view and 28d_click conversion information out of the Facebook marketing API, I only really need the count and amount of sales but I'm struggling to find the values in the response when I do the following in PHP: $campaign = new Campaign('[CAMPAIGN ID]'); $params = array('date_preset' => InsightsPresets::YESTERDAY, 'action_attribution_windows' => array('7d_view', '28d_click')); $fields = array('campaign_id', 'campaign_name', 'reach', 'spend','social_spend', 'total_actions', 'total_unique_actions'); $insights = $campaign->getInsights($fields, $params); foreach ($insights as $ins) { var_dump($ins); } It executes and returns basic values e.g. Campaign name etc, but it does not seem to include any kind of conversion data. I suspect I need to add something to the fields array - but I don't know what. Sorry to ask, but the facebook documentation for the current version of the marketing API (v2.7) says the conversion attribution is deprecated but I can't find what it has been replaced with.

Posted on 16 Aug 2022, this text provides information on Facebook Marketing API related to Digital Marketing. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ Sometimes its just a matter of talking to the duck (https://en.wikipedia.org/wiki/Rubber_duck_debugging) - I simply needed to add "actions" to the fields array.

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.