Custom Affinity in Criteria perfomance report

229 views
Skip to first unread message

andrey....@lamoda.ru

unread,
Sep 8, 2016, 10:18:52 AM9/8/16
to AdWords API Forum
I'm trying to get 'Custom Affinity' criteria type in CRITERIA_PERFORMANCE_REPORT but it doesn't exist.
Let me explain:
1. First of all I have installed google api library for python v. 1.5.3
2. Then I tried to download CRITERIA_PERFORMANCE_REPORT with CriteriaType field and in successfully ended.
3. When I try to find Custom Affinity in downloaded XML-file, I found nothing.

API version used: 201603, 201605

Is it OK or I do something wrong?

__________________________________________________________________________
CONFIDENTIALITY NOTICE: The information contained in the present message (including any information contained in attachments herein) may be confidential and privileged. It may be read, copied and used only by the intended recipient. If you have received it in error please contact the sender (by return e-mail) immediately and delete this message. Any unauthorized use or dissemination of this message in whole or in parts is strictly prohibited. Print this message only if sharp necessary.
УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: Информация, содержащаяся в настоящем сообщении (включая любое вложение) может быть конфиденциальной и охраняться действующим законодательством. Сообщение может быть прочитано, скопировано и использовано исключительно лицом, которому сообщение предназначается. Если Вы получили настоящее сообщение по ошибке, пожалуйста, незамедлительно сообщите об этом отправителю (ответным письмом по электронной почте). Любое несанкционированное использование или распространение информации, содержащейся в настоящем сообщении в целом или в части, строго запрещены. Не распечатывайте настоящее сообщение, если в этом нет крайней необходимости.

Shwetha Vastrad (AdWords API Team)

unread,
Sep 8, 2016, 3:48:38 PM9/8/16
to AdWords API Forum
Hi Andrey,

Could you provide the complete report definition you are using along with your clientCustomerId? Have you set the includeZeroImpressions header to true in the report request? 

Thanks,
Shwetha, AdWords API Team.

lamoda...@lamoda.ru

unread,
Sep 9, 2016, 9:50:04 AM9/9/16
to AdWords API Forum
Hi Shwetha,

Client Customer ID is 8099393253
and I disable includeZeroImperssions 'cause we have impressions :) and it minimize a bit report size.

So finally DownloadReport call looks like this:

client.DownloadReport(
report_definition={
'reportName': 8099393253,
'dateRangeType': 'CUSTOM_DATE',
'reportType': 'CRITERIA_PERFORMANCE_REPORT',
'downloadFormat': 'XML',
'selector': {
'fields': [
'AdGroupId',
'AdNetworkType1',
'BidModifier',
'CpcBid',
'CampaignId',
'Clicks',
'ClickType'
'Cost',
'CriteriaType',
'Date',
'Device',
'DisplayName',
'Id',
'Impressions',
],
'dateRange': {'min': '2016-09-08', 'max': '2016-09-09'},
}
},
output=open('/path', 'w'),
include_zero_impressions=False
)
Message has been deleted

Shwetha Vastrad (AdWords API Team)

unread,
Sep 9, 2016, 1:52:51 PM9/9/16
to AdWords API Forum
Hi,

The clientCustomerId you have provided belongs to a Manager account. You should include the clientCustomerId of an AdWords client account to be able to download report data using AdWords API. Did the response to the above request contain any errors? Could you retry this report request by setting the clientCustomerId to that of an AdWords client account?

andrey....@lamoda.ru

unread,
Sep 12, 2016, 8:02:28 AM9/12/16
to AdWords API Forum
Hi again,
I've made a mistake. Client customer ID is 260-270-8616, and we have no errors while downloading.

Igor Selitskiy

unread,
Sep 13, 2016, 4:10:58 AM9/13/16
to AdWords API Forum
It happens with all our accounts using this criteria type.
Check for example clientCustomerId 260-270-8616 for  Sept 02  AdGroupId 26627114405 .

Shwetha Vastrad (AdWords API Team)

unread,
Sep 13, 2016, 1:04:12 PM9/13/16
to AdWords API Forum
Hi Igor,

Could you provide the complete report definition you are using to download report data along with a sample report in which the custom affinity audience criteria are missing? Please use Reply privately to author when responding. 

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 15, 2016, 1:57:36 AM9/15/16
to adwor...@googlegroups.com
Hello Igor,

There are no support for this criteria type in AUDIENCE_PERFORMANCE_REPORT yet.
The data may be returned in CRITERIA_PERFORMANCE_REPORT but as it's a single attribution report, we can't guarantee that we can see custom affinity criteria always returned.
I'm not aware of the plan to support this in AUDIENCE_PERFORMANCE_REPORT in the near future.

For the release announcement, you can follow our announcements thread.

Best,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Sep 15, 2016, 2:07:34 AM9/15/16
to adwordsapiad...@google.com, AdWords API Forum

It's already supported by API itself, but isn't supported by Python library. Do you mean there is no support in Python library yet?


15 сент. 2016 г. 8:57 AM пользователь "'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum" <adwor...@googlegroups.com> написал:
Hello Igor,

There are no support for this criteria type in AdWords API yet.
I'm not aware of the plan to support this in the near future.

For the release announcement, you can follow our announcements thread.

Best,
Thanet, AdWords API Team

On Wednesday, September 14, 2016 at 2:04:12 AM UTC+9, Shwetha Vastrad (AdWords API Team) wrote:
Hi Igor,

Could you provide the complete report definition you are using to download report data along with a sample report in which the custom affinity audience criteria are missing? Please use Reply privately to author when responding. 

Thanks,
Shwetha, AdWords API Team.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/jbW1WQ1iWoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/7cbdad6c-61c8-426b-a20e-823f9ea63ffa%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Igor Selitskiy

unread,
Sep 15, 2016, 2:10:09 AM9/15/16
to adwordsapiad...@google.com, AdWords API Forum

There is  anounce of this criteria type in criteria performance report in API v201601.


15 сент. 2016 г. 9:06 AM пользователь написал:

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 15, 2016, 2:14:26 AM9/15/16
to adwor...@googlegroups.com, adwordsapiad...@google.com
Hi Igor,

Yes, but the data for custom affinity may not always be returned in the criteria performance report, as it's a single attribution.
That's why you're not seeing anything.

I know that this is confusing to you.
I've given feedback to engineering as a feature request to add support for custom affinity in AUDIENCE_PERFORMANCE_REPORT already.

Apologize for this inconvenience.

Best,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Sep 15, 2016, 3:42:31 AM9/15/16
to AdWords API Forum, adwordsapiad...@google.com
Feature request?

Do you mean that Python library has separate from main API feature list?

On Thursday, September 15, 2016 at 9:14:26 AM UTC+3, Thanet Knack Praneenararat (AdWords API Team) wrote:
Hi Igor,

Yes, but the data is not fed into that criteria type yet.
That's why you're not seeing anything.

I know that this is confusing to you.
I've given feedback to engineering as a feature request already.

For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/jbW1WQ1iWoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 15, 2016, 4:27:06 AM9/15/16
to adwor...@googlegroups.com, adwordsapiad...@google.com
Hi Igor,

No. I meant the AdWords API itself, not related to any client libraries.

Cheers,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Sep 15, 2016, 6:07:48 AM9/15/16
to AdWords API Forum, adwordsapiad...@google.com
Guys, are you sure?
:
"Improvements to reports

The list of possible enum values for the CriteriaType field on the CRITERIA_PERFORMANCE_REPORT has expanded to include:

  • PARENT - Parental status
  • CUSTOM_AFFINITY - Custom affinity"


On Thursday, September 15, 2016 at 11:27:06 AM UTC+3, Thanet Knack Praneenararat (AdWords API Team) wrote:
Hi Igor,

No. I meant the data itself is not available in AdWords API, not related to any client libraries.
Message has been deleted

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 16, 2016, 3:48:25 PM9/16/16
to AdWords API Forum, adwordsapiad...@google.com
Hello,

Let me summarize some info here again. (I already edited some messages above so that people who happen to read from the beginning don't get confused)

First, I'm so sorry to make you misunderstand that CUSTOM_AFFINITY is not returned in CRITERIA_PERFORMANCE_REPORT.
Actually, it does but not in all cases that you can get the data for CUSTOM_AFFINITY back.
The reason is that the criteria performance report is a single attribution type.
In this type of report, we can't guarantee that all types of criteria type will appear, nor can we control what kinds of criteria will appear.
This is a concept used in AdWords API reporting for a long time.

As you may know, one impression (and other stats like click) for display network can be triggered by one or more criteria.
For example, an impression might be triggered by gender maleage range 34-43, and an affinity with name "A".
In criteria performance report, however, this impression can be attributed to only one of any of gender OR age range OR affinity.
We don't know and can't guarantee which one will be reported.
If it's reported as attributed to gender male already, then this particular impression will not appear again in the report.

In your case, it's likely that all impressions attributed to all custom affinities are reported to be attributed to other criteria.
That's why you don't see them attributed to custom affinity in your report.

The workaround would be to use multiple attribution report (or criteria-type specific report) like AUDIENCE_PERFORMANCE_REPORT instead.
However, the data for CUSTOM_AFFINITY is not returned in that report yet.
I'm following up with engineering to see if we can return data for CUSTOM_AFFINITY in AUDIENCE_PERFORMANCE_REPORT in the near future.
Unfortunately, we don't have ETA for this yet.

Cheers,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Sep 16, 2016, 4:27:51 PM9/16/16
to AdWords API Forum, adwordsapiad...@google.com
Hi, I understand single and multiply attribution in AdWords. I know the difference. We're using both types of attribution.
And I need criteria performance report in single attribution. This is mandatory and critical for us.
But the problem is not in attribution. Problem is that API don't return lines with Custom Affinity, but AdWords script do, GA also show this data.
BTW the total costs/clicks/impressions in criteria performance report from API are less than actual costs!

We provide examples for you in private message, even more I point out on one of our AdGroup to illustrate the problem.

Thanet Knack Praneenararat

unread,
Sep 17, 2016, 12:34:28 AM9/17/16
to AdWords API Forum, adwordsapiad...@google.com
Hi Igor,

And I need criteria performance report in single attribution. This is mandatory and critical for us.
Could you please clarify why you need this report type despite the behavior I explained before, that is, you can't guarantee what to get back?

But the problem is not in attribution. Problem is that API don't return lines with Custom Affinity, but AdWords script do, GA also show this data.
API does return custom affinity but as I explained before, not in all situations that it will return custom affinity back, because it's a single attribution.
Besides, GA and AdWords Script doesn't always use the same infrastructure as AdWords API.
We can't expect the same behaviors across the products.

BTW the total costs/clicks/impressions in criteria performance report from API are less than actual costs!
If you mean comparing the result from criteria performance report with that in Display Network of UI, then it's as expected.
Those in UI are mainly multiple attribution reports and the total number of stats mostly can't be matched directly with the single attribution reports.

Feel free to ask more questions, if you feel this is still not clear.

Best,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Sep 17, 2016, 3:18:22 AM9/17/16
to AdWords API Forum, adwordsapiad...@google.com
Hi, Thanet.


On Saturday, September 17, 2016 at 7:34:28 AM UTC+3, Thanet Knack Praneenararat wrote:
Hi Igor,

And I need criteria performance report in single attribution. This is mandatory and critical for us.
Could you please clarify why you need this report type despite the behavior I explained before, that is, you can't guarantee what to get back?

We use it for matching with orders using gclid (click performance report) , orders calculated by our own attribution. This report contain all spends on targeting level (keyword_id). Google Analytics do the same.
BTW Click performance report contains custom affinity. So currently we cannot match the data correctly. How GA do it? Use different infrastructure, hidden from advertisers, even for big advertiser.

 

But the problem is not in attribution. Problem is that API don't return lines with Custom Affinity, but AdWords script do, GA also show this data.
API does return custom affinity but as I explained before, not in all situations that it will return custom affinity back, because it's a single attribution.
Besides, GA and AdWords Script doesn't always use the same infrastructure as AdWords API.
We can't expect the same behaviors across the products.

What do you mean? We've compared result from script and API: it's the same except lines with custom affinity.
 

BTW the total costs/clicks/impressions in criteria performance report from API are less than actual costs!
If you mean comparing the result from criteria performance report with that in Display Network of UI, then it's as expected.
Those in UI are mainly multiple attribution reports and the total number of stats mostly can't be matched directly with the single attribution reports.

I know that there are only multiply attribution reports in UI. We're using such reports for some specific optimizations (placement, banners, audience and etc).
But for matching with gclid I need criteria report.

Igor Selitskiy

unread,
Sep 19, 2016, 9:30:45 AM9/19/16
to AdWords API Forum, adwordsapiad...@google.com
Any updates?
How long does it take to fix this issue?

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 19, 2016, 9:40:09 AM9/19/16
to AdWords API Forum, adwordsapiad...@google.com
Hello Igor,

We use it for matching with orders using gclid (click performance report) , orders calculated by our own attribution. This report contain all spends on targeting level (keyword_id). Google Analytics do the same.
BTW Click performance report contains custom affinity. So currently we cannot match the data correctly. How GA do it? Use different infrastructure, hidden from advertisers, even for big advertiser.
I still doubt if you can do in that way, as Click Performance Report returns only attribute-type fields, no metric fields.
That's partly why you see custom affinity appears in the Click Performance Report, but not in the Criteria Performance Report.
Originally, they gather data in a different way.
Let me check with engineering to find more.

What do you mean? We've compared result from script and API: it's the same except lines with custom affinity.
To be clear, do you compare the result from script with API or do you compare the result from Click Performance Report with Criteria Performance Report?
If the former (you run the same report type, but from script and from API), could you please send me the result and AWQL?
I need to use that information to pass to engineering so that we can see what happens.

I've already contacted engineering about this for more clarification.
So far, if you mean the results from click performance report and criteria performance report are different, it doesn't look like an issue to fix.
That works as intended.

Cheers,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Sep 19, 2016, 10:07:07 AM9/19/16
to AdWords API Forum, adwordsapiad...@google.com
See my answers in citation below:


On Monday, September 19, 2016 at 4:40:09 PM UTC+3, Thanet Knack Praneenararat (AdWords API Team) wrote:
Hello Igor,

We use it for matching with orders using gclid (click performance report) , orders calculated by our own attribution. This report contain all spends on targeting level (keyword_id). Google Analytics do the same.
BTW Click performance report contains custom affinity. So currently we cannot match the data correctly. How GA do it? Use different infrastructure, hidden from advertisers, even for big advertiser.
I still doubt if you can do in that way, as Click Performance Report returns only attribute-type fields, no metric fields.
That's partly why you see custom affinity appears in the Click Performance Report, but not in the Criteria Performance Report.
Originally, they gather data in a different way.
Let me check with engineering to find more.

We're using click performance report only for decrypt gclid.
 

What do you mean? We've compared result from script and API: it's the same except lines with custom affinity.
To be clear, do you compare the result from script with API or do you compare the result from Click Performance Report with Criteria Performance Report?
I compared AsWords scripts with API.
If the former (you run the same report type, but from script and from API), could you please send me the result and AWQL?
I need to use that information to pass to engineering so that we can see what happens.
Yes, see the file in private answer.  

Igor Selitskiy

unread,
Sep 22, 2016, 4:55:02 AM9/22/16
to AdWords API Forum, adwordsapiad...@google.com
Hi, any updates here?

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 22, 2016, 10:39:58 AM9/22/16
to AdWords API Forum, adwordsapiad...@google.com
Hello Igor,

I'm confirming if the data gathering logic of Criteria Performance Report of API is different from that of Script, but not got the final answer yet.
I'll update this thread once I have more information.

Thanks for your patience.

Best,
Thanet, AdWords API Team

On Thursday, September 22, 2016 at 5:55:02 PM UTC+9, Igor Selitskiy wrote:
Hi, any updates here?

Igor Selitskiy

unread,
Nov 8, 2016, 2:58:32 AM11/8/16
to AdWords API Forum, adwordsapiad...@google.com
Hi, any news on this bug?

I've checked ad performance report (adding criteriaId and criteriaType).
It show correct data with custom affinity, but it didn't contains names (display name), only id (criteriaId).
How can I get names for criteria Id?
(we've milllions of keywords).

Thanet Knack Praneenararat (AdWords API Team)

unread,
Nov 8, 2016, 12:56:26 PM11/8/16
to AdWords API Forum, adwordsapiad...@google.com
Hello Igor,

Sorry for the delay. I'm chasing this issue with the engineering.
As for Ad Performance Report, you can't get the the criterion ID directly. 
Mapping the ID with other reports or using Selectors is needed.

Cheers,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Nov 8, 2016, 4:40:14 PM11/8/16
to AdWords API Forum, adwordsapiad...@google.com
Сan this mapping be updated on daily basis if we've millions of active criteriaIds? 
What is the best way to update it for all types of targetings?

In criteria performance I use fields:

displayname can be placement and I don't need to load additional mapping dictionary for this targeting.

In Ad Performance Report I only have CriteriaId(

Thanet Knack Praneenararat (AdWords API Team)

unread,
Nov 9, 2016, 2:35:26 AM11/9/16
to AdWords API Forum, adwordsapiad...@google.com
Hello Igor,

I understand that this is not so convenient for you.
The best workaround for now would be storing the mapping in your local database, possibly only for the custom affinity criteria for now.
You can filter to get only rows containing criterion type of CUSTOM_AFFINITY in Ad Performance Report.

How many custom affinities you have among other criteria, e.g., keywords?

Best,
Thanet, AdWords API Team

Thanet Knack Praneenararat (AdWords API Team)

unread,
Mar 10, 2017, 12:39:52 AM3/10/17
to AdWords API Forum, adwordsapiad...@google.com
Hello,

FYI: The custom affinity criteria should appear in CRITERIA_PERFORMANCE_REPORT now.
Please ensure to set includeZeroImpressions to true if your custom affinities don't get any impressions during a specified date range.

Sorry for this inconvenience and for keeping you waiting for long.

Cheers,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Mar 10, 2017, 2:57:00 AM3/10/17
to AdWords API Forum, adwordsapiad...@google.com
Hi, Thanet.

Good news!
I don't see this data now. Should we switch to the latest version (201702) for Custom Affinity?
I suppose that we use 201609.

Thanet Knack Praneenararat (AdWords API Team)

unread,
Mar 10, 2017, 3:25:18 AM3/10/17
to AdWords API Forum, adwordsapiad...@google.com
Hi Igor,

This should work for all versions. :)
If you don't see them, probably it's because it doesn't get any statistics and it needs includeZeroImpression to be turned on.
I can see the data of your ad group ID 26627114405.

Best,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Mar 10, 2017, 5:36:15 AM3/10/17
to AdWords API Forum, adwordsapiad...@google.com
Why should I use includeZeroImpression?

Why cannot get Custom Affinity without includeZeroImpression?

Thanet Knack Praneenararat (AdWords API Team)

unread,
Mar 10, 2017, 9:10:49 AM3/10/17
to AdWords API Forum, adwordsapiad...@google.com
Hello Igor,

What I meant is in the case when your custom affinities don't get any stats for a certain period of time, e.g., 20160902 for ad group ID 26627114405.
If your custom affinities get some stats, and they're recorded as triggering criteria of CRITERIA_PERFORMANCE_REPORT, then they should appear in the result without includeZeroImpressions set to true.

Cheers,
Thanet, AdWords API Team

Igor Selitskiy

unread,
Mar 10, 2017, 9:39:23 AM3/10/17
to AdWords API Forum, adwordsapiad...@google.com
I've got it, thank you!

 We use our reports for performance analysis and don't set zeroImpressions, but Custom Affinity is in the Criteria Performance report now, cost is correct (the same as in the banner performance report).
Reply all
Reply to author
Forward
0 new messages