1

I'm trying to get data grouped by days for a particular ad, but I only get a subset of days that doesn't include the last days of activity. I have tried to introduce different parameters to change this behaviour but nothing seems to work.

Here's the code causing trouble:

$ad_fb = new FacebookAd($this->ad->api_id);

    // REPORTS

    $arr_insights = $ad_fb->getInsights([
        // fields
        InsightsFields::UNIQUE_IMPRESSIONS,
        InsightsFields::VIDEO_COMPLETE_WATCHED_ACTIONS,
        InsightsFields::UNIQUE_CLICKS,
        InsightsFields::DATE_START,
        InsightsFields::DATE_STOP,
        InsightsFields::IMPRESSIONS,
        InsightsFields::TOTAL_ACTIONS,
    ], [
        'time_increment' => 1,
        "date_preset" => 'lifetime'
    ]);

    dd($arr_insights);

Removing the date_preset and defining a wide time_range parameter will only return a smaller subset of ads.

Can anyone give me a helping hand with this? Thanks!

Eneko
  • 61
  • 1
  • 5

0 Answers0