Open phillipmohr opened 5 months ago
I'm trying to get the total amount that has been spent for a specific campaign. How can I do that?
const insightsPromise = new Campaign(campaignId).getInsights([AdsInsights.Fields.ad_name, AdsInsights.Fields.spend]);
When I access the spend field, it only returns a value if the campaign is still active. If the campaign is inactive, I do not get a value.
spend
My approach:
const adSetsPromise = new Campaign(campaignId).getAdSets([AdSet.Fields.id, AdSet.Fields.daily_budget, AdSet.Fields.lifetime_budget]);
Get the total amount spent.
I'm trying to get the total amount that has been spent for a specific campaign. How can I do that?
Which SDK version are you using?
const insightsPromise = new Campaign(campaignId).getInsights([AdsInsights.Fields.ad_name, AdsInsights.Fields.spend]);
What's the issue?
When I access the
spend
field, it only returns a value if the campaign is still active. If the campaign is inactive, I do not get a value.My approach:
Expected Results:
Get the total amount spent.