Facebook marketing API Action_attribution_windows No views

When using Facebook api marketing, I want to load actions without the action_attribution_windows 1d_view option.

I am currently using the following setting:

# Ad import fields fields = [ # Ad meta data Insights.Field.account_id, Insights.Field.account_name, Insights.Field.campaign_id, Insights.Field.campaign_name, Insights.Field.adset_id, Insights.Field.adset_name, Insights.Field.ad_id, Insights.Field.ad_name, Insights.Field.date_start, Insights.Field.date_stop, # Ad metrics Insights.Field.cpc, Insights.Field.cpm, Insights.Field.cpp, Insights.Field.ctr, Insights.Field.impressions, Insights.Field.reach, Insights.Field.spend, Insights.Field.inline_link_clicks, Insights.Field.clicks, Insights.Field.actions ] # Ad parameters params_ad = { 'level': Insights.Level.ad, 'limit': limit if limit > 0 else None, 'time_range': { 'since': since, 'until': until }, 'action_attribution_windows': ['28d_click'], } # Download data from Facebook my_insights = my_account.get_insights(fields=fields, params=params_ad) 

This, however, loads the data as 28d_click with 1d_view. As I think, it defaults to 1d_view when not set.

How to disable 1d_view?

+5
source share
1 answer

How to disable 1d_view?

You can’t, you need to specify the number of days if you use action_attribution_windows otherwise, as you might guess, the default will be 1d_view

From the documents, action_attribution_windows you can set custom parameters for the day, as this: list

However, you can specify 7d_view , 28d_view if you do not need 1d_view .

We measure the actions that occur when a conversion event occurs, and look back for 1 day, 7 days, and 28 days.

Link:

https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights/

https://developers.facebook.com/docs/marketing-api/insights/v2.9

Please comment for more information.

0
source

Source: https://habr.com/ru/post/1268396/


All Articles