We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
18.0.2
The AdInsights object doesn't have fields for breakdowns
spend_stats = FacebookAds::AdAccount .get(ad_account_id, session) .insights( time_range: { since: date.to_s(:db), until: date.to_s(:db) }, breakdowns: ['hourly_stats_aggregated_by_advertiser_time_zone'], fields: %w[impressions clicks spend ad_id adset_id campaign_id], level: 'ad', ) .all spend_stats[0].impressions # => "1234" spend_stats[0].ad_id # => "some-ad-id" spend_stats[0].hourly_stats_aggregated_by_advertiser_time_zone # NoMethodError: undefined method `hourly_stats_aggregated_by_advertiser_time_zone' for #<FacebookAds::AdsInsights {:impressions=>"1234", :clicks=>"x", :spend=>"x", :ad_id=>"some-ad-id", :adset_id=>"some-adset-id", :campaign_id=>"some-campaign-id", :date_start=>"2023-10-18", :date_stop=>"2023-10-18", :hourly_stats_aggregated_by_advertiser_time_zone=>"06:00:00 - 06:59:59"}> spend_stats[0][:hourly_stats_aggregated_by_advertiser_time_zone] # => "06:00:00 - 06:59:59"
Calling hourly_stats_aggregated_by_advertiser_time_zone on the AdInsights object raises a NoMethodError
hourly_stats_aggregated_by_advertiser_time_zone
Calling hourly_stats_aggregated_by_advertiser_time_zone on the AdInsights object returns the value of the field
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which SDK version are you using?
18.0.2
What's the issue?
The AdInsights object doesn't have fields for breakdowns
Steps/Sample code to reproduce the issue
Observed Results:
Calling
hourly_stats_aggregated_by_advertiser_time_zone
on the AdInsights object raises a NoMethodErrorExpected Results:
Calling
hourly_stats_aggregated_by_advertiser_time_zone
on the AdInsights object returns the value of the fieldThe text was updated successfully, but these errors were encountered: