Hello.
I was trying to reproduce the "Paid & Organic" report, to which I also added the campaign and ad group statuses.
In the UI, if I filter the data by these statuses, the resulting report is significantly smaller than the original report without the campaign and ad group statuses equal to ENABLED. Specifically, I get 28584 if I only fetch rows where the campaign is enabled (rather than 28881), and I get 13256 rows if I also select only enabled ad groups.
However, if I try to reproduce that same report, whose screenshot you can find below, using the API and the following query, I am not able, because the API returns a lot more results.
Here's the query.
SELECT
paid_organic_search_term_view.search_term,
campaign.status,
ad_group.status,
metrics.impressions,
metrics.clicks,
metrics.ctr,
metrics.average_cpc,
metrics.organic_impressions,
metrics.organic_clicks,
metrics.organic_queries,
metrics.organic_clicks_per_query,
metrics.organic_impressions_per_query,
metrics.combined_clicks,
metrics.combined_queries,
metrics.combined_clicks_per_query,
segments.search_engine_results_page_type
FROM paid_organic_search_term_view
WHERE segments.date BETWEEN '2022-10-01' AND '2022-11-12' AND campaign.status = 'ENABLED' AND ad_group.status = 'ENABLED'
The API returns 28404, excluding rows where all metrics are zero, and so on. In any case, the differences are too big.
Here's the UI report I'm trying to reproduce.
According to
the docs, the API doesn't segment the data by the campaign or ad group status (or any other campaign or ad group attributes). However, if the API is supposed to mirror the UI, we should be able to reproduce the report that I'm trying to reproduce. So,
how can I do it?
Thank you.