Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $campaignSets = json_decode($account->getCampaigns($fields)->getResponse()->getBody());
- print_r($campaignSets->data);
- echo "<br><br>";
- $insight_fields = array(
- 'campaign_name',
- 'adset_name',
- 'adset_id',
- 'ad_name',
- 'ad_id',
- 'clicks',
- 'impressions',
- 'reach',
- 'spend',
- 'cpc',
- 'cpm',
- 'cpp',
- 'ctr',
- 'reach',
- 'unique_clicks',
- 'unique_ctr',
- 'cost_per_unique_click',
- 'actions',
- 'cost_per_action_type'
- );
- $insight_params = array(
- 'level' => 'account',
- 'time_range' => array(
- 'since' => "2017-06-01",
- 'until' => "2017-07-31"
- ),
- 'date_preset' => 'lifetime'
- );
- $insights = $account->getInsights($insight_fields, $insight_params)->getResponse()->getBody();
- print_r($insights);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement