We have a BigQuery data transfer of GoogleAds data. I came to realization, that I probably do not understand what is in the aggregates.
The discrepancy occurs with "Discovery" campaigns. Here is the query:
SELECT '1. AdStats' as table, SUM(Clicks) AS clicks, SUM(Cost)/1000000 AS cost, SUM(Impressions) AS impressions FROM `project.dataset.p_AdStats_*` WHERE Date = @date AND CampaignId = @campaign UNION ALL SELECT '2. AdBasicStats' as table, SUM(Clicks) AS clicks, SUM(Cost)/1000000 AS cost, SUM(Impressions) AS impressions FROM `project.dataset.p_AdBasicStats_*` WHERE Date = @date AND CampaignId = @campaign UNION ALL SELECT '3. AdGroupStats' as table, SUM(Clicks) AS clicks, SUM(Cost)/1000000 AS cost, SUM(Impressions) AS impressions FROM `project.dataset.p_AdGroupStats_*` WHERE Date = @date AND CampaignId = @campaign UNION ALL SELECT '4. AdGroupBasicStats' as table, SUM(Clicks) AS clicks, SUM(Cost)/1000000 AS cost, SUM(Impressions) AS impressions FROM `project.dataset.p_AdGroupBasicStats_*` WHERE Date = @date AND CampaignId = @campaign ORDER BY 1
The results come in:
table clicks cost impressions 1. AdStats 74 2.906935 15582 2. AdBasicStats 74 345.444868 15582 3. AdGroupStats 78 15.786935 15802 4. AdGroupBasicStats 78 358.324868 15802
The GoogleAds UI shows 78 clicks, €358.32 and 15802 impressions for campaign report. It matches AdGroupBasicStats
.
But I need more.. I need math to hold - AdBasicStats should have the same data, but in more granular detail (on Ad level). But it does not. Also, this is just killing me:
345.444868 + 15.786935 - 2.906935 = 358.324868 ?!?!
What the actual f...? I've tested multiple days, different campaigns. The math is there. Can someone explain me what does those aggregates have? Point me to any resource describing the data in the tables, please.
Couple of notes:
- I suspect that data from
AdStats
is already in both AdBasicStats
and AdGroupStats
. Thus the minus in equation. But what does that data stand for? How can I identify such data in other aggregates? - Backfill is not the culprit, I've refreshed data multiple times in historical periods.
- Interestingly enough, this behaviour only occurs with "Discovery" campaigns. Other types, e.g. "Display", seems not to have this discrepancy.
- I've tried to contact Google Ads support, but they directed me to the GCP support instead, which we don't have available for our account.