Hello! hope you are well
In our team we want to get through the API, the cost per adgroup in
relation to the hour, as it can be done in the Google Ads UI, we leave a
real example in the first attached file.
We are using the official python library and we use the following query in
the code to get the costs and the hours:
SELECT
ad_group.ad_rotation_mode,
ad_group.base_ad_group,
ad_group.campaign,
ad_group.cpc_bid_micros,
ad_group.cpm_bid_micros,
ad_group.cpv_bid_micros,
ad_group.display_custom_bid_dimension,
ad_group.effective_target_cpa_bid_micros,
ad_group.effective_target_cpa_source,
ad_group.effective_target_roas,
ad_group.effective_target_roas_source,
ad_group.id,
ad_group.labels,
ad_group.name,
ad_group.resource_name,
ad_group.status,
ad_group.target_cpa_micros,
ad_group.target_cpm_micros,
ad_group.target_roas,
ad_group.type,
segments.hour,
metrics.cost_micros
FROM ad_group
Here is an example of what we get.
"customers/x/adGroups/x": {
"resource_name": "customers/x/adGroups/x",
"status": "ENABLED",
{ "type_": "SEARCH_STANDARD",
"effective_target_cpa_source": "AD_GROUP",
"effective_target_roas_source": "AD_GROUP",
"id": "x",
"name": "x",
"base_ad_group": "customers/x/adGroups/x",
"campaign": "customers/x/campaigns/x",
"cpc_bid_micros": "1130000",
"cpm_bid_bid_micros": "10000",
"target_cpa_micros": "30240000",
"cpv_bid_bid_micros": "0",
"target_cpm_micros": "10000",
"target_roas": "8.8294",
"effective_target_cpa_micros": "30240000",
"effective_target_roas": 8.8294,
"labels": [
"customers/x/labels/x",
"customers/x/labels/x"
],
"date": "2023-03-13",
"hour": 12,
"cost_micros": "470000".
}
Then we make a process to insert this data in a sql database, but it
doesn't match with what we have in the Google Ads UI.
The question is,
1. is our logic right when asking for hourly costs?
2. if the data we ask for is ok, can it be that our code is wrong?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/b45235e1-9c8d-4f4b-b7e2-3c333f7942f7n%40googlegroups.com.