pull pmax campaign cost

27 views
Skip to first unread message

Rexton Chen

unread,
Aug 19, 2024, 11:38:47 AM8/19/24
to Google Ads API and AdWords API Forum
I need to pull the pmax type campaign cost from the campaign and start date dimensions. But it seems impossible. Because from the perspective of the document, there is only the account_id field, and it is not refined to the campaign_id field.

Google Ads API Forum Advisor

unread,
Aug 19, 2024, 10:41:08 PM8/19/24
to rexto...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Based on the information provided, I understand that you would like to pull Performance Max (Pmax) campaign cost data with the start date field for the campaigns in your account. You can retrieve Pmax campaign cost data by using the campaign resource and include the fields campaign.id, campaign.start_date, and metrics.cost_micros in your query. I would recommend referring to this document for more information about the Performance Max campaign report. You can try this sample query to pull the cost data for Pmax campaigns:
SELECT campaign.id, metrics.cost_micros, campaign.start_date FROM campaign WHERE campaign.advertising_channel_type = 'PERFORMANCE_MAX' AND campaign.id = 1234567
Also, you can utilize GoogleAdsService.SearchStream or GoogleAdsService.Search to retrieve the objects. I would suggest you use the Query Builder to build your query and Query Validator to validate your query.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vF7vY:ref" (ADR-00263906)

Thanks,
 
Google Logo Google Ads API Team

 

Reply all
Reply to author
Forward
0 new messages