1

enter image description here

I have a requirement to add 'Conversion Window' (as above) to an existing Java application which creates batches of Facebook ads. I can't find how to set Conversion Window via the API or how to get a list of them from the API.

This is the most relevant information I've found:

https://developers.facebook.com/docs/marketing-api/reference/ads-action-stats

But it doesn't give me all of what I need.

1 Answer 1

4

Although named similarly, those are two different things.

Conversion window specified with bidding is a time period used for optimization of ad delivery. The parameter is called attribution_specand can be set on adset. Valid combinations are described here.

Adset with conversion window of 1-day view, 7-day click would be specified like this:

{ "name": "Adset name", "attribution_spec": [ { "event_type": "VIEW_THROUGH", "window_days": 1 }, { "event_type": "CLICK_THROUGH", "window_days": 7 } ], ... other adset params ... } 

Attribution window is a parameter used when loading insights. Using that you can get the stats broken down into different time periods, which can be handy for advanced analytics.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks! This was really helpful. However, conversion windows can have the following options: 1-day click 7-day click 1-day click and 1-day view 7-day click and 1-day view There doesn't seem to be any examples of how to call the API with this information though. I can see that the sdk provides the class APIRequestCreateAdSet with the method setAttributionSpec(List<Map<String, String>>) but I can't find what the values in the map should be.
I updated the answer with adset specification with attribution_spec
Thanks! We seen to have this working. The only issue is that the conversion window in the facebook marketing UI for ad sets isn't displayed for the adsets it's added too.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.