Multiple rows for same AdGroupId, Id in Age Performance Report

84 views
Skip to first unread message

Talha Khan

unread,
Feb 18, 2020, 10:06:50 AM2/18/20
to AdWords API and Google Ads API Forum
Hi,

For Age Performance Report for the date - 20200217, I am getting multiple rows with the same AdGroupId and Id.
When I added CriterionId, I found they have different CriterionIds.
But, since, in the request, I've not added CriterionId, so, shouldn't data be aggregated across AdGroupId and Id and return a single row summing clicks, cost, etc for all the CriterionIds.?
I checked the documentation, it says: "The Ad Performance report includes all statistics aggregated at the ad level, one row per ad. If other segment fields are used, you may get more than one row per ad." 

Google Ads API Forum Advisor Prod

unread,
Feb 18, 2020, 4:32:48 PM2/18/20
to ta...@hevodata.com, adwor...@googlegroups.com

Hi Talha,

Thank you for reaching out to us. I see that you’re encountering multiple rows with the same AdGroupId and Id. This is because Age Range Performance Report is a multiple attribution report, which can be thought of as criteria type-specific reports. Thus you may encounter multiple rows with the same AdGroupId and Id. These multiple attribution reports should not be aggregated together, however, as it may double count impressions and clicks. Let me know if you have further questions.

Thank you,
Bryan, Google Ads API Team



ref:_00D1U1174p._5001UV1OER:ref
Message has been deleted

Talha Khan

unread,
Feb 18, 2020, 10:22:17 PM2/18/20
to AdWords API and Google Ads API Forum
Hi,

Sorry for the misspelling, It's Ad Performance Report.
I am getting multiple rows with the same AdGroupId and Id, with different data(as in clicks in one row is 50 and another row is 30) for the Ad Performance Report. And I am not requesting any segment fields listed in the documentation. Ideally, shouldn't it be aggregated at the AdGroupId and Id level, and there should be a single row with number of clicks as 80?
Since in the documentation, it's written: "The Ad Performance report includes all statistics aggregated at the ad level, one row per ad. If other segment fields are used, you may get more than one row per ad"
My report definition is the following :

{
  "id": null,
  "selector": {
    "fields": [
      "AbsoluteTopImpressionPercentage",
      "AccentColor",
      "AccountCurrencyCode",
      "AccountDescriptiveName",
      "AccountTimeZone",
      "ActiveViewCpm",
      "ActiveViewCtr",
      "ActiveViewImpressions",
      "ActiveViewMeasurability",
      "ActiveViewMeasurableCost",
      "ActiveViewMeasurableImpressions",
      "ActiveViewViewability",
      "AdGroupId",
      "AdGroupName",
      "AdGroupStatus",
      "AdStrengthInfo",
      "AdType",
      "AllConversionRate",
      "AllConversionValue",
      "AllConversions",
      "AllowFlexibleColor",
      "Automated",
      "AverageCost",
      "AverageCpc",
      "AverageCpe",
      "AverageCpm",
      "AverageCpv",
      "AveragePageviews",
      "AveragePosition",
      "AverageTimeOnSite",
      "BaseAdGroupId",
      "BaseCampaignId",
      "BounceRate",
      "BusinessName",
      "CallOnlyPhoneNumber",
      "CallToActionText",
      "CampaignId",
      "CampaignName",
      "CampaignStatus",
      "ClickAssistedConversionValue",
      "ClickAssistedConversions",
      "ClickAssistedConversionsOverLastClickConversions",
      "Clicks",
      "CombinedApprovalStatus",
      "ConversionRate",
      "ConversionValue",
      "Conversions",
      "Cost",
      "CostPerAllConversion",
      "CostPerConversion",
      "CostPerCurrentModelAttributedConversion",
      "CreativeDestinationUrl",
      "CreativeFinalAppUrls",
      "CreativeFinalMobileUrls",
      "CreativeFinalUrlSuffix",
      "CreativeFinalUrls",
      "CreativeTrackingUrlTemplate",
      "CreativeUrlCustomParameters",
      "CrossDeviceConversions",
      "Ctr",
      "CurrentModelAttributedConversionValue",
      "CurrentModelAttributedConversions",
      "CustomerDescriptiveName",
      "Description",
      "Description1",
      "Description2",
      "DevicePreference",
      "DisplayUrl",
      "EngagementRate",
      "Engagements",
      "EnhancedDisplayCreativeLandscapeLogoImageMediaId",
      "EnhancedDisplayCreativeLogoImageMediaId",
      "EnhancedDisplayCreativeMarketingImageMediaId",
      "EnhancedDisplayCreativeMarketingImageSquareMediaId",
      "ExpandedDynamicSearchCreativeDescription2",
      "ExpandedTextAdDescription2",
      "ExpandedTextAdHeadlinePart3",
      "ExternalCustomerId",
      "FormatSetting",
      "GmailCreativeHeaderImageMediaId",
      "GmailCreativeLogoImageMediaId",
      "GmailCreativeMarketingImageMediaId",
      "GmailForwards",
      "GmailSaves",
      "GmailSecondaryClicks",
      "GmailTeaserBusinessName",
      "GmailTeaserDescription",
      "GmailTeaserHeadline",
      "Headline",
      "HeadlinePart1",
      "HeadlinePart2",
      "Id",
      "ImageAdUrl",
      "ImageCreativeImageHeight",
      "ImageCreativeImageWidth",
      "ImageCreativeMimeType",
      "ImageCreativeName",
      "ImpressionAssistedConversionValue",
      "ImpressionAssistedConversions",
      "ImpressionAssistedConversionsOverLastClickConversions",
      "Impressions",
      "InteractionRate",
      "InteractionTypes",
      "Interactions",
      "IsNegative",
      "LabelIds",
      "Labels",
      "LongHeadline",
      "MainColor",
      "MarketingImageCallToActionText",
      "MarketingImageCallToActionTextColor",
      "MarketingImageDescription",
      "MarketingImageHeadline",
      "MultiAssetResponsiveDisplayAdAccentColor",
      "MultiAssetResponsiveDisplayAdAllowFlexibleColor",
      "MultiAssetResponsiveDisplayAdBusinessName",
      "MultiAssetResponsiveDisplayAdCallToActionText",
      "MultiAssetResponsiveDisplayAdDescriptions",
      "MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix",
      "MultiAssetResponsiveDisplayAdDynamicSettingsPromoText",
      "MultiAssetResponsiveDisplayAdFormatSetting",
      "MultiAssetResponsiveDisplayAdHeadlines",
      "MultiAssetResponsiveDisplayAdLandscapeLogoImages",
      "MultiAssetResponsiveDisplayAdLogoImages",
      "MultiAssetResponsiveDisplayAdLongHeadline",
      "MultiAssetResponsiveDisplayAdMainColor",
      "MultiAssetResponsiveDisplayAdMarketingImages",
      "MultiAssetResponsiveDisplayAdSquareMarketingImages",
      "MultiAssetResponsiveDisplayAdYouTubeVideos",
      "Path1",
      "Path2",
      "PercentNewVisitors",
      "PolicySummary",
      "PricePrefix",
      "PromoText",
      "ResponsiveSearchAdDescriptions",
      "ResponsiveSearchAdHeadlines",
      "ResponsiveSearchAdPath1",
      "ResponsiveSearchAdPath2",
      "ShortHeadline",
      "Status",
      "SystemManagedEntitySource",
      "TopImpressionPercentage",
      "UniversalAppAdDescriptions",
      "UniversalAppAdHeadlines",
      "UniversalAppAdHtml5MediaBundles",
      "UniversalAppAdImages",
      "UniversalAppAdMandatoryAdText",
      "UniversalAppAdYouTubeVideos",
      "ValuePerAllConversion",
      "ValuePerConversion",
      "ValuePerCurrentModelAttributedConversion",
      "VideoQuartile100Rate",
      "VideoQuartile25Rate",
      "VideoQuartile50Rate",
      "VideoQuartile75Rate",
      "VideoViewRate",
      "VideoViews",
      "ViewThroughConversions"
    ],
    "predicates": [],
    "dateRange": {
      "min": "20200217",
      "max": "20200217"
    },
    "ordering": [],
    "paging": null
  },
  "reportName": "Ad Performance Report",
  "reportType": "AD_PERFORMANCE_REPORT",
  "dateRangeType": "CUSTOM_DATE",
  "downloadFormat": "CSV"
}

Talha Khan

unread,
Feb 19, 2020, 2:50:01 AM2/19/20
to AdWords API and Google Ads API Forum
Hi,
So, I tried out various things.
Case 1: When I add 3 fields => [AdGroupId, Id, Clicks] for the same date(17th Feb 2020), customerId, Ad Performance Report returns 14566 rows.
Case 2: As soon as I add 1 more field => [AdGroupId, Id, Clicks, IsNegative] for the same date, customerId, Ad Performance Report returns 284 rows, which is okay, since IsNegative For AdPerformanceReport doesn't support ZeroImpressions, so adding that attribute, makes ZeroImpression as False and returns fewer rows.
But, the issue is, in Case 1: the data is correct(clicks = 35) and [AdGroupId and Id] combination is unique.
In Case 2: the data is incorrect and there are 2 rows for one of the [AdGroupId and Id] combination, with values of click as [30 and 5], which sums up to 35. I want to know, why there are 2 rows in the 2nd Case, though I didn't ask for any segment field. It should sum up the click values for the [AdGroupId and Id] combination and return 1 row with click value as 35.

Google Ads API Forum Advisor Prod

unread,
Feb 19, 2020, 2:45:56 PM2/19/20
to ta...@hevodata.com, adwor...@googlegroups.com

Hi Talha,

Thank you for the information and clarification. In your example, the reason Case 2 provides you with two rows for the same AdGroupId and Id combination is because the field IsNegative has two types, “True” and “False”. In this case, your click value of 35 is being bifurcated into the clicks where IsNegative is True or False. This may be the case for some of the attribute types. Let me know if you have further questions.

Talha Khan

unread,
Feb 20, 2020, 12:21:07 AM2/20/20
to AdWords API and Google Ads API Forum
Hi,
But in the documentation it's clearly written, if I don't put segment fields in the request, the statistics are aggregated at the ad level, one row per ad. And IsNegative is not a segment attribute according to the documentation.
https://developers.google.com/adwords/api/docs/appendix/reports/ad-performance-report
"The Ad Performance report includes all statistics aggregated at the ad level, one row per ad. If other segment fields are used, you may get more than one row per ad. See segmentation for more information. This is a single attribution report when CriterionId is requested. The CriterionId field will return any criteria that triggered the ad, not just keywords."

Also, when you are saying, "This may be the case for some of the attribute types", how do we know, such attributes for each report. Is there documentation pointing to that?

Google Ads API Forum Advisor Prod

unread,
Feb 20, 2020, 3:28:45 PM2/20/20
to ta...@hevodata.com, adwor...@googlegroups.com

Hi Talha,

I understand your concern and would like to clarify my previous message. In Ad Performance Report, when you pull an attribute, the report will pull all instances of that attribute that is available. For example, when you query AdGroupId, what you should obtain is every single AdGroupId that is available in the Ad Performance Report under the account you run the query against.

If we apply this to IsNegative, you may encounter some AdGroups that have more than one criterion, in which some are negative (true) and positive (false) that are delimited by the predicate values in the documentation. In this case, you are querying every available criterion and whether the obtained criterion is positive or negative. This isn’t segmenting your data, but rather providing each instance of a positive or negative criterion in your report. Let me know if you have further questions.

Talha Khan

unread,
Feb 20, 2020, 4:34:44 PM2/20/20
to AdWords API and Google Ads API Forum
Okay.
1) Is there a way to know all such attributes for each report which would result in creating multiple rows. How to find such attributes for each report type?
2) Will this IsNegative cause multiple rows across all the reports where this attribute is valid?

Google Ads API Forum Advisor Prod

unread,
Feb 21, 2020, 2:56:31 PM2/21/20
to ta...@hevodata.com, adwor...@googlegroups.com

Hi Talha,

Thank you for the update. I see two concerns that need to be addressed.

1. Is there a way to know all such attributes for each report which would result in creating multiple rows. How to find such attributes for each report type?

There is no existing list of attributes that would result in creating multiple rows. However, some attributes could produce more than one row if more than one type of attribute exists in that ad group. For example, IsNegative can produce more than one row because there is a chance that your ad group has both negative and positive criterion that exist in the adgroup. However, attributes such as AdGroupStatus cannot be Enabled, Paused, and Disabled at the same time since an AdGroup can only be one status at any given time, therefore it will never provide more than one row.

2. Will this IsNegative cause multiple rows across all the reports where this attribute is valid?

IsNegative may cause multiple rows in some reports where this attribute is a valid attribute if there happens to be an instance where there exists a couple criterion in the same “group” or “campaign” where some are positive and some are negative, in which the report will differentiate the metrics per “positive criteria” and “negative criteria” on the level of the chosen report type. 

Talha Khan

unread,
Feb 21, 2020, 11:48:16 PM2/21/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Hi,
We are an ETL platform. 
This doesn't help me, as the report which I get, becomes uncertain, until I know because of which attributes, we can have multiple rows. I would like to remove such attributes from the request itself, to make sure, I can rely on the data. Right now, I am not sure if I could use the values as is from the report. 
Also, it should be mentioned in the documentation for each attribute in each report, if adding the attribute in the request can result in multiple rows or not. Right now the documentation directly says, it would be one row per ad for Ad Performance Report,if you don't add segment attributes.

Google Ads API Forum Advisor Prod

unread,
Feb 24, 2020, 10:13:01 PM2/24/20
to ta...@hevodata.com, adwor...@googlegroups.com

Greetings!

 

This was sent over to me because in my 5 years of working on this product, I’ve seen a lot. I have to admit that when I first saw this when I started, I also found it confusing. By the way, kudos on your debugging skills! You noticed that it was isNegative causing you issues; not everyone would notice that.

 

Since there’s a lot going on here, I’ll explain this in a couple of steps:

  1. I’ll explain what isNegative is doing in this case.

  2. I’ll show you some queries and results to back it up.

  3. I’ll explain what this means in general for all your other queries.

 

#1

When you look at the definition of isNegative in the report, it says: Indicates if the criterion for this row is a negative (exclusion) criterion.

This means that this field is tied to a criterion. The expectation is that you would never call isNegative without requesting CriterionId because isNegative by itself does not mean anything because you don’t know what isNegative is referring to without the criterion. As a result, isNegative is an attribute tied to the CriterionId segment, which is why it’s labeled as an attribute. The end result is that isNegative appears to implicitly segment when in reality, there’s a mysterious CriterionId that is actually doing the segmenting. 

 

#2

As an engineer, I like to see the code that explains the whole thing. You’re probably the same way, so I’ll show you the queries with their sample results. Please keep in mind that with all these queries, I’ve set includeZeroImpressions to false because I don’t want to be distracted by data with no impressions. 

 

SELECT AdGroupId, Id, Clicks FROM AD_PERFORMANCE_REPORT DURING 20200217,20200217

image1

Everything looks normal with a unique ad group ID and ad ID pair.

 

SELECT AdGroupId, Id, Clicks, IsNegative FROM AD_PERFORMANCE_REPORT DURING 20200217,20200217

image2

With this one, we see what looks like duplicates. The good news is that the totals are correct. In the next query, you’ll see that they aren’t duplicates. There is a hidden CriterionId doing the segmentation when you called isNegative. In this query, you called a criterion field, so the key is 3 values (AdGropId, Id, and CriterioinId).

 

SELECT AdGroupId, Id, Clicks, CriterionId, IsNegative FROM AD_PERFORMANCE_REPORT DURING 20200217,20200217

image3

In the last query, I included the CriterionId. As you can see, the key is now 3 values (AdGropId, Id, and CriterioinId). Each row is unique.

 

#3

Your concern is absolutely valid about other fields being affected. I’ll look into seeing if we can add some warning there in the future for that field. As for other fields, I don’t know of any other field that behaves the same way as this one. You shouldn’t be seeing anything else like this. If you do, please tell us.

 

I hope that explains the mystery. If you need further clarification, feel free to ask.

 

Best,

Nadine Wang, Google Ads API Team

 
 


ref:_00D1U1174p._5001UV1OER:ref

Talha Khan

unread,
Feb 25, 2020, 7:36:00 AM2/25/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Thanks a lot for the detailed explanation.
This is what I assumed, is Negative is some how, segmenting the data based on KeywordId.

Third point, really helps me.
We can close the thread.

Thanks, 
Talha 

image1.png
image2.png
image3.png
Reply all
Reply to author
Forward
0 new messages