Daily spend for campaigns and line items

Posted in General by Pantelis Tue Dec 12 2017 12:38:59 GMT+0000 (Coordinated Universal Time)·8·Viewed 462 times

Hello, I would like to ask if the campaign and line item responses return information about current day spend (eg daily_spend) in the same manner that is done for campaign_budget, campaign_spend.
Dec 12, 2017

You can access a number of additional useful fields about line items and campaigns by using a specialized view in the GET. To access these stats add "view_name":"campaign_stats" or "view_name":"line_item_stats". To see all the fields available, also add "view_all":true

Dec 13, 2017

Thank you! I see from the campaign_stats view (in combination with view_all) most of the fields are there. Nevertheless, in the default view of the campaign, there is a daily budget displayed, that when campaign_stats view is selected disappears. Is there a view that contains both daily_budget and today_spend? Also does today_spend value of null mean zero?

Dec 13, 2017

you can specify exactly which fields you want like this: "view_name":"campaign_stats","fields":["campaign_budget","campaign_spend","today_spend",etc]

Dec 13, 2017

Yes. But campaign_stats view does not include daily_budget in the response.

Dec 13, 2017

Yes, you are correct. I am adding this as a product request.

Dec 14, 2017

Thanks a lot, I see daily_budget now.

1) Nevertheless, it is string instead of a number. In case no daily budget is set what is its value? "0.0" or null?
2) Also, the today_spend in all demo campaigns is null. What is its data type? Is it string or a number (what are the possible values of that? e.g. 10.0 / null or "10.0"/ null?). I need that in order to know how to handle it.

Dec 14, 2017

These fields are numbers when non-null.

Dec 14, 2017

Nice, thanks :) Currently though in the responses the daily_budget in campaign_stats view is string

  
Markdown is allowed