What are the possible reasons why I cannot reproduce a UI report, which, in theory, can be reproduced with the landing_page_view?

103 views
Skip to first unread message

Nelson Brochado

unread,
Dec 16, 2022, 7:44:30 AM12/16/22
to Google Ads API and AdWords API Forum
Hi guys.

I'm trying to reproduce the following Google Ads UI report.

mobile.png

In theory, as far as I understand, this report can be reproduced with the landing_page_view. Please, correct me if I am wrong here, because this is my assumption.

Unfortunately, I was not yet able to fully reproduce this UI (with Google Ads API v12) with the following query

SELECT
landing_page_view.unexpanded_final_url,
campaign.status,
ad_group.status,
metrics.speed_score,
metrics.mobile_friendly_clicks_percentage,
metrics.clicks,
metrics.impressions,
metrics.ctr
FROM landing_page_view
WHERE
segments.date BETWEEN '2022-10-01' AND '2022-11-12'
AND
campaign.status = ENABLED
AND
ad_group.status = ENABLED

I get 7491 rows, which are the same number of rows I find in the UI report (see the screenshot). However, after having compared the 2 data frames (I'm using pandas), it seems that there are 33 rows returned by the API that are not found in the UI report, and I can't really explain why.

So, here are my questions

1. Why is there a difference between the API and UI reports/data? 

2. What does the API do that the UI doesn't and vice-versa (for this specific report)? 

3. What should I change in my query in order to reproduce exactly the UI report above?

The only advice given in the Google Ads API documentation that I found regarding possible differences is that the UI implicitly filters REMOVED campaigns and so we should also ignore them, but, as you can see above, I am only selecting ENABLED campaigns, so this is not the problem.

Note: if I use an older GAD API version (specifically, v11), I get even more different results, with the same query. I get many fewer rows. Why is that?

Thanks for all the help.

Nelson Brochado

unread,
Dec 16, 2022, 9:20:37 AM12/16/22
to Google Ads API and AdWords API Forum
I forgot to mention that, before comparing the API and UI reports, I am dropping all rows where the metrics are all zero. This makes the API report still have 7491 rows (so the API doesn't return, at least in this case, rows where all metrics are zero), while the UI reports now has 7458 rows. Note 7491 - 7458 = 33, hence the 33 rows in the API report that are not found in the UI report. In fact, these 33 rows do not have all metrics equal to zero. In particular, it seems that the clicks are not equal to zero, but all other metrics are.

Google Ads API Forum Advisor

unread,
Dec 16, 2022, 1:10:33 PM12/16/22
to nelson....@webrepublic.ch, adwor...@googlegroups.com
Hi Nelson,

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

1. Why is there a difference between the API and UI reports/data?  To investigate the issue further, could you please provide the complete request and response logs, with the request-id? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

2. What does the API do that the UI doesn't and vice-versa (for this specific report)? Could you please provide full screen screenshot of the UI of what you are looking for?


3. What should I change in my query in order to reproduce exactly the UI report above? 
   I can confirm here your query is correct.

You can provide it via Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead. 

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2h3nbv:ref

Nelson Brochado

unread,
Jan 9, 2023, 4:48:17 PM1/9/23
to Google Ads API and AdWords API Forum
Hi. Can you please confirm that you have received my message with the request and response info (as you requested)? Thanks.

Google Ads API Forum Advisor

unread,
Jan 10, 2023, 1:45:58 AM1/10/23
to nelson....@webrepublic.ch, adwor...@googlegroups.com
Hi Nelson,

Thank you for the reply.

Please note that when adding some segments, the metrics in the summary row may decrease or increase, and upon checking it, I can see that you have selected segments fields. Please note that ad_group and campaign are segmenting resources of landing_page_view. Upon replicating it on my end, I can see that it has matched results when you remove the segments field both in the UI and API or if you filter the impressions greater to 0. You may try the sample below query to check it with your end:

“SELECT landing_page_view.resource_name, landing_page_view.unexpanded_final_url, campaign.id, campaign.name, ad_group.name, ad_group.id, campaign.status, ad_group.status, metrics.speed_score, metrics.mobile_friendly_clicks_percentage, metrics.clicks, metrics.impressions, metrics.ctr FROM landing_page_view WHERE segments.date BETWEEN '2022-10-01' AND '2022-11-12' AND ad_group.status = 'ENABLED' AND campaign.status = 'ENABLED' and metrics.impressions>0 ","return_total_results_count" : true

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2h3nbv:ref

Nelson Brochado

unread,
Jan 10, 2023, 4:07:22 AM1/10/23
to Google Ads API and AdWords API Forum
Thanks for the answer.

If I select only rows where impressions are greater than zero, then, yes, the API and UI data seem to match. 

But can't we also find a way to remove this constraint? What if I would also like to select rows where impressions are zero?

I understand that certain resources or segments may segment the data, but this also happens in the UI. So, I suppose that there must be a way to reproduce exactly the UI report without having this constraint. 

Thanks.

Google Ads API Forum Advisor

unread,
Jan 10, 2023, 5:30:36 AM1/10/23
to nelson....@webrepublic.ch, adwor...@googlegroups.com
Hi Nelson,

Thank you for getting back to our team.

We really understand your situation. However,  kindly note that to produce a more useful report, you can explicitly exclude zero metrics. Please see this zero metrics guide for more information.

Regards,
Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2h3nbv:ref

Nelson Brochado

unread,
Jan 10, 2023, 5:57:53 AM1/10/23
to Google Ads API and AdWords API Forum
Hi.

Thanks. 

I understand that, in many if not most cases, people may not want to consider rows where all metrics are zero. By default, the API does not return these rows and, in my code, I also exclude them by default (just in case the API changed). However, you're asking me to exclude rows where only one of the metrics is zero (i.e. impressions), where the others may not be zero, which may not be desirable. I'm developing this simple application, where I would give the possibility to the user to select whether to add or not this constraint. 

So, I would like to know

1. Why can't I reproduce the UI report without the impressions > 0? Is this a bug in the Google Ads API?
2. And, if I can reproduce the UI report without this constraint, how can I do it?

Thank you.

Google Ads API Forum Advisor

unread,
Jan 10, 2023, 3:37:06 PM1/10/23
to nelson....@webrepublic.ch, adwor...@googlegroups.com

Hi Nelson,
 

Thank you for getting back to us. I hope you are doing well today.
 

We appreciate your patience with this concern. Upon checking your account in our end, I can see that there is discrepancy encountered here. With this, allow me to raise this to the rest of our team. We will provide updates once available.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 



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