ADGROUP_PERFORMANCE_REPORT | Get Adgroup Target CPA

100 views
Skip to first unread message

Yaron Lev

unread,
Nov 23, 2021, 3:11:44 AM11/23/21
to Google Ads Scripts Forum
Hey Team,

We are trying to fetch adgroups Target CPA via the following query:

SELECT AdGroupId,AdGroupName, Conversions,TargetCpa
FROM ADGROUP_PERFORMANCE_REPORT 

The issues is that "TargetCPA" always return empty = "--"
How do I get the Adgroup Target CPA via a report?

Sidenote: using the Adgroup iterator, I can get the correct value via adgroup.bidding()->getCPA(), however working w the iterator on large accounts is extremely slow which is why I am hoping to use the reports.

Thanks!

Google Ads Scripts Forum Advisor

unread,
Nov 23, 2021, 8:43:05 PM11/23/21
to adwords...@googlegroups.com
Hi,

Thanks for reaching out. Harry here, from the Google Ads Scripts Team.

Kindly provide your Google Ads account ID, script's name and a shareable link to your spreadsheet if available so I can take a look closer at the issue you are encountering. You may send the spreadsheet privately via the reply to author option.

Looking forward to your reply.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2RvVzA:ref

Yaron Lev

unread,
Nov 24, 2021, 3:15:28 AM11/24/21
to Google Ads Scripts Forum
Hey Harry,

Account Id: 439-896-5145
MCC Id: 574-171-4553
Script Name:  "ADGROUP_PERFORMANCE_REPORT | Get TCPA | Test" // created it just to illustrate the issue
Sheet: No sheet is required for this script.

Reminder - Trying to fetch Adgroups target CPA bid via a report.

Thanks!

Yaron Lev

unread,
Nov 24, 2021, 3:15:51 AM11/24/21
to Google Ads Scripts Forum
P.S running this from our MCC.

Google Ads Scripts Forum Advisor

unread,
Nov 24, 2021, 9:45:39 PM11/24/21
to adwords...@googlegroups.com
Hi Yaro,

Thanks for providing the requested details. I was able to replicate the issue on my end but can you kindly provide me of a Google Ads UI screenshot of the data you expect to retrieve through scripts for further reference? I should be able to tap the rest of the team in this regard for deeper investigation. In the meantime, I would recommend pulling the ad_group view report via the Google Ads Query Language (GAQL) while we sort out this issue. You can use the migrated query below:
SELECT ad_group.name, ad_group.effective_target_cpa_micros FROM ad_group WHERE ad_group.status = "ENABLED" AND campaign.status = "ENABLED"

Yaron Lev

unread,
Nov 25, 2021, 3:33:26 AM11/25/21
to Google Ads Scripts Forum
Thanks this looks good will check soon, was not aware of GAQL.

Attaching the requested screenshots, 
Thanks!

Screenshot from script:
2021-11-25_10-30-39.png

Screenshot from Google Ads UI:

2021-11-25_10-32-10.png





Yaron Lev

unread,
Nov 25, 2021, 4:21:15 AM11/25/21
to Google Ads Scripts Forum
Hey Harry,

The above query does not return the correct values for the Adgroup Target CPA

Example query output:
2021-11-25_11-17-09.png


Screenshot from UI, same Adgroup:
2021-11-25_11-18-24.png

As you can see the query returns
effective_target_cpa_micros = 12000000, while the actual bid is $110.0. Also I got no idea what this number represent ("effective_target_cpa_micros ").

I checked other Adgroups bids, non are correct, also tried to play with other fields but to no avail.

Thanks!

Google Ads Scripts Forum Advisor

unread,
Nov 26, 2021, 12:38:35 AM11/26/21
to adwords...@googlegroups.com
Hi Yaro,

Thanks for coming back with more details. Allow me to raise this to the rest of the team and get back to you once new information becomes available. With regard to GAQL, please check if you are using the same filters with your script and with the Google Ads UI report.

Please let me know of anything else.

Yaron Lev

unread,
Nov 29, 2021, 1:59:22 AM11/29/21
to Google Ads Scripts Forum
Same filters = there are not filters.....  The GAQL query does not return the correct TCPA per Adroup (by ID) either as described in the previous post, meaning the return value does not correlate to the actual value.

Google Ads Scripts Forum Advisor

unread,
Dec 1, 2021, 2:23:47 AM12/1/21
to adwords...@googlegroups.com
Hi Yaro,

Thanks for clarifying that for me. Could you provide me of the CID / Google Ads account ID where your script that uses GAQL is included and its name so I can check the discrepancies you have found from there?

Yaron Lev

unread,
Dec 6, 2021, 4:20:29 AM12/6/21
to Google Ads Scripts Forum
Thanks Harry,

To be honest I have checked many times, but looks it like it is working now. I guess either I am drunk or there is some lag between bid updating and what this report is showing. 
So this issue is closed for now.

Google Ads Scripts Forum Advisor

unread,
Dec 6, 2021, 9:30:41 PM12/6/21
to adwords...@googlegroups.com
Hi Yaro,

Thanks for coming back. I would assume that you are pertaining to the values from pulling the ad_group view report using GAQL but could you also confirm if you are no longer having issues with pulling the Adgroup Performance Report using AWQL? Do you still encounter the same issue from there so I can follow up on the team's investigation for you?


Looking forward to your reply.

Yaron Lev

unread,
Dec 7, 2021, 2:58:15 AM12/7/21
to Google Ads Scripts Forum
Hey Harry,

GAQL - Working fine now.
AWQL - Still showing 0 for TCPA value, same script as before is available for you to confirm if needed.

Best

Google Ads Scripts Forum Advisor

unread,
Dec 7, 2021, 5:28:17 AM12/7/21
to adwords...@googlegroups.com
Hi Yaro,

Thanks for confirming that for me. I will keep this open to track the issue with AWQL and let you know of any new updates from there as soon as possible. Please let me know of anything I can assist you with.

Google Ads Scripts Forum Advisor

unread,
Dec 1, 2022, 10:39:34 PM12/1/22
to adwords...@googlegroups.com

Hi Yaro,

 

This is Yasmin from the Google Ads scripts team.

 

Just circling back here, could you please confirm if you are still encountering the issue? If yes, you could migrate your query to the new script experience version by using the query migration tool. Kindly refer to the query below:

SELECT campaign.id, campaign.name, ad_group.id, ad_group.name, metrics.cost_micros, metrics.impressions, metrics.ctr, metrics.clicks, metrics.conversions_from_interactions_rate, metrics.cost_per_conversion, metrics.conversions, ad_group.effective_target_cpa_micros, ad_group.effective_target_cpa_source FROM ad_group WHERE ad_group.status = "ENABLED" AND campaign.status = "ENABLED"

 

Let us know how it goes or if we can assist you with anything else.

 

Best regards,

 

 

Google Logo
Yasmin Gabrielle
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2RvVzA:ref
Reply all
Reply to author
Forward
0 new messages