Hi Team,
while creating a new search campaign using adwords APIs, values for Age
Range, Income Range and Genders are added by default. *All the options are
enabled by default*. But when I try to get the existing values using the
PageQueries, these values are not getting reflected in the response. I
always get null values.
Following is the code.
====
String query = "SELECT Id, IncomeRangeType WHERE AdGroupId = " + adGroupId
+ " AND CriteriaType = 'INCOME_RANGE' AND CriterionUse != 'NEGATIVE' ORDER
BY Id";
AdGroupCriterionPage page = *null*;
*int* offset = 0;
*do* {
String pageQuery = query + String.*format*(" LIMIT %d, %d", offset,
*PAGE_SIZE*);
page = adGroupCriterionService.query(pageQuery);
*if* (page.getEntries() != *null*) {
*for* (AdGroupCriterion adGroupCriterionResult : page.getEntries()) {
IncomeRange incomeRange = (IncomeRange) adGroupCriterionResult
.getCriterion();
AdwordsIncomeRange adwordsIncomeRange = *new* AdwordsIncomeRange(incomeRange
);
adGroupIncomeRangeList.add(adwordsIncomeRange);
}
}
offset += *PAGE_SIZE*;
} *while* (offset < page.getTotalNumEntries());
*return* adGroupIncomeRangeList;
=====
*But when I make some changes in the ages range, income range and gender
values through AdWords UI, the above query works perfectly fine and
provides me the enabled/active ages ranges.*
Could you please let me know if there is any specific query param I need to
get the default enabled/eligible age ranges, income ranges and genders?
Thanks,
Chaitanya
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/f1fd1496-6233-48a4-ba37-a95fbc35af0c%40googlegroups.com.