get metrics.cost by campaign and account

93 views
Skip to first unread message

Nir Krumer

unread,
Oct 19, 2020, 5:49:32 AM10/19/20
to AdWords API and Google Ads API Forum
Hey,
I have created the connection to google ads.
Now, I have a list of client_customers (AKA the account in my ad account).
How do I get the information regarding the campaigns of these accounts.

In other words, I have all the parents- now I want to get the info of the children (campaigns)
I try to understand how to build SQL query and objects to get this

Can somebody assist?

Thanks

Google Ads API Forum Advisor Prod

unread,
Oct 19, 2020, 2:17:28 PM10/19/20
to adwor...@googlegroups.com

Hi Nir,

Thank you for reaching out. Please follow this guide to build SQL query in Adwords API. You could query the Campaign Performance Report to fetch campaign data. Please refer to these code examples on how to run reports in the Adwords API.

Thanks and regards,
Xiaoming, Google Ads API Team


Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q26AHx2:ref

Nir Krumer

unread,
Oct 20, 2020, 6:11:14 AM10/20/20
to adsapifor...@gmail.com, adwor...@googlegroups.com
Hey, I'm not sure my required data sits in *_performance_report.
I want to perform something like
Select campaignId, campaigName, metrics.cost from campaign

I dont understand how make this query, while i have my cuatomerId & client_customer list

Appreciate your help

Nir



בתאריך יום ב׳, 19 באוק׳ 2020, 21:17, מאת Google Ads API Forum Advisor Prod ‏<adsapifor...@gmail.com>:
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/LB5EMJpZJpA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/E9dnn000000000000000000000000000000000000000000000QIGO4800Em2ldHvCTFSXZAh0h0hYLQ%40sfdc.net.

Google Ads API Forum Advisor Prod

unread,
Oct 25, 2020, 11:00:08 PM10/25/20
to adwor...@googlegroups.com
Hi Nir,

I work with Xiaoming and allow me to assist you for now.

If you wish to retrieve campaign stats and cost for only the month of September, then you may opt to use custom date ranges or predefined dates in your query, to capture a specific period. Let me know if this helps.

Thanks,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q26AHx2:ref

Nir Krumer

unread,
Oct 26, 2020, 11:54:55 AM10/26/20
to adsapifor...@gmail.com, adwor...@googlegroups.com
Hey, That helps!
Now I have the metrics.cost_micros in campaign level for all my accounts.
The issue is like that:

When I compare my received google invoice to those metrics.cost numbers- 
In my example, I see that the total cost for the account is correct and fit.
When I go to the campaign level - I see several campaigns that don't have the same numbers as the invoices.
Why is that?
Should I use another numeric field / other?

I can send you screenshot of the example. just share with me your mail address that I can send the photo with these example numbers.

Thanks alot
Nir

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/LB5EMJpZJpA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.


--

Nir Krumer

Business Applications Manager

E-Mail: nir.k...@naturalint.com

Mobile+972 (0)50-8248181

Google Ads API Forum Advisor Prod

unread,
Oct 27, 2020, 2:26:27 AM10/27/20
to adwor...@googlegroups.com
Hi Nir,

There should be an option in this forum thread in the three dots icon, where you can choose Reply to author or Reply privately to author. If the options are not available, you can send the details of the discrepancy you are encountering between the report and your invoice, directly to our googleadsa...@google.com alias.

Please provide the complete request and response logs if you are using the InvoiceService, any Google Ads UI screenshots you are viewing for comparison, and also the complete report query so our team can investigate.
Reply all
Reply to author
Forward
0 new messages