Re: Strange behavior when get SITELINK from API

2018-06-12 Thread Eduardo Cesar
Tank you!

I tried both solutions, but i didn't get any result yet. I'm using 
pagination, but I'm checking if there is more pages when I call the API. 
This is my wrapper for get service API:

def get_from_adwords_account(adwords_client, service_name, fields,
 predicates=None):
adwords_service = adwords_client.GetService(service_name,

version=settings.API_VERSION)
items = []
offset = 0
PAGE_SIZE = settings.PAGE_SIZE
selector = {
'fields': fields,
'paging': {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
}
}
if predicates:
selector['predicates'] = predicates
more_pages = True
while more_pages:
page = adwords_service.get(selector)
if 'entries' in page:
for entry in page['entries']:
items.append(entry)
offset += PAGE_SIZE
selector['paging']['startIndex'] = str(offset)
more_pages = offset < int(page['totalNumEntries'])
return items

However, I changed my PAGE_SIZE to 1 to check if there is some problem 
in the pagination logic. I had the same result (with filter: The result is 
empty; without filter: The result does not contain any SITELINK).
Is there something that I can do to get the sitelink for this account? It 
is very strange, because this same code and logic works in others accounts 
in our MCC.

Best Regards.
Eduardo Cesar
  

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@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/45268c88-8cfe-47c0-b77d-385112444ab2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Strange behavior when get SITELINK from API

2018-05-30 Thread Eduardo Cesar
We're getting the Campaign Sitelink Settings using 
'CampaignExtensionSettingService'. The returned list of extensions is 
exactly the expected for almost all accounts in our mcc.
However, for some accounts, we are not receiving any SITELINK extension 
setting in returned list (In this same accounts, the returned CALL, 
CALLOUT, SNIPPET extensions returned are consistent comparing the AdWords 
state).
For this accounts, we have sitelink settings in campaign level, with 
impression, clicks and etc. Is there some bug in this endpoint that can 
explain it?

We're using the last version of API (201802).



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@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/cac1f3c8-ca25-42c6-8e9b-212b6c6339ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Get last cpcbid change date using KEYWORD PERFORMANCE REPORT

2017-12-11 Thread Eduardo Cesar
It is very strange, because when I get the report the cpcbid is not 
constant in the time. Do you know a possible motive to this return?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/f3cbe3f2-b410-49b5-9be8-d59b2d0acbb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Get last cpcbid change date using KEYWORD PERFORMANCE REPORT

2017-12-09 Thread Eduardo Cesar
When I get the report using the time_range as 'LAST_30_DAYS' and select the 
field *'DATE',* many keywords have different cpcbid through the time.
I think for each row the cpcbid is the last cpcbid of the day (*Am I 
correct?*) . If it is correct, I can find the days when a cpcbig chage 
occurred (Not considering some specific cases). 

I know if I not do the segmentation by date, the returned value is the 
current bid. What if I segment the report by 'date' field? 

Thanks.
Eduardo Cesar

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/c0e75f7a-3ed9-42c5-8df8-5ec1faafe531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Get last cpcbid change date using KEYWORD PERFORMANCE REPORT

2017-12-07 Thread Eduardo Cesar
I know that I can not get the CPC bid history directly...
But can I use this solution below?

I use the keyword report and choose the fields 'Id', 'CpcBid' and 'Date'.
Then the report will return the CpcBid history for each keyword.
If I know the cpc history in the report, then I can find the exact day that 
a change occurred.

If what I have said is true, I think it is possible discovery the exact 
date of keyword bid changed.
*Is this approach correct?*

Thanks!
Eduardo Cesar

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/80a6c7b9-b647-4d5b-ae30-46ab1bd28fd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Get last cpcbid change date using KEYWORD PERFORMANCE REPORT

2017-12-07 Thread Eduardo Cesar
Hello.

I'm trying to get two important  information from my keywords using Adwords 
API. The first is the CURRENT CPC bid. The second is the last date that the 
bid was modified.

I prefer use the report (and not the AdgroupCriterionService) to get the 
cpc info. My doubts are:

1) If I choose the field 'CpcBid' in the report and choose 'LAST_30_DAYS' 
time window, the returned value CpcBid is EVER the current CpcBid?
2) How can I get the last date that the cpc was modified in keyword using 
adwords reports? 

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/c44d79e4-ee87-41b9-b00b-bc365751c32f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Error in get firstPageCpc, topOfPageCpc and firstPositionCpc in AdGroupCriterionService

2017-11-10 Thread Eduardo Cesar
Hello!

When I try get one of this fields (*firstPageCpc*, *topOfPageCpc* or 
*firstPositionCpc*) in *AdGroupCriterionService* in an *Test Account*, I 
don't get this fields in response:

Example: 

fields = ['FinalUrls', 'CriterionUse', 'FirstPositionCpc', 'TopOfPageCpc', 
'FirstPageCpc']]
predicates = [{
'field': 'Id',
'operator': 'EQUALS',
'values': keywords_id
}, {
'field': 'Status',
'operator': 'EQUALS',
'values': ['ENABLED', 'PAUSED']
}, {
'field': 'CriterionUse',
'operator': 'EQUALS',
'values': ['BIDDABLE']
}]

Response:

[(BiddableAdGroupCriterion){
adGroupId = 48717291815
criterionUse = "BIDDABLE"
criterion =
(Keyword){
id = 380701996243
type = "KEYWORD"
Criterion.Type = "Keyword"
matchType = "BROAD"
}
AdGroupCriterion.Type = "BiddableAdGroupCriterion"
finalUrls =
(UrlList){
urls[] =
"https://www.test.url;,
}
}]


My doubts:
1) Is this an expected behavior for test accounts? (Is it possible in test 
account this fields not appear in response?)
2) Is it possible to have the same behavior in a normal account (not test 
account)?
3) How this cpc bids are estimated?
4)Does the api work equals for new keywords - without impressions- and old 
keywords in account?

--
Best regards,

Eduardo Cesar

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/9e443ef3-46f3-421b-b302-3a753455f00e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AWQL x others API methods

2017-10-26 Thread Eduardo Cesar
Some doubts:

1) Are All queries that we can do using AWQL possible using [.get methods + 
predicates + filters]?

2) Are the the soap response/request when we use AWQL query and [.get 
methods + predicates + filters]?

3) Is AWQL more efficient in Google Adwords API (The Google response is 
faster than the equivalent call using [.get methods + predicates + 
filters]) ?

Regards,

Eduardo Cesar

Em quinta-feira, 26 de outubro de 2017 04:34:45 UTC-2, Peter Oliquino 
escreveu:
>
> Hi Eduardo,
>
> For my answers to your questions, kindly refer below :
>
> 1) There is something that we can do only using AWQL (That is impossible 
> using others services methods)?
>
> The AWQL query can be used in both the reports and in the services of 
> the AdWords API. For the services, they are usually used when the .query() 
> method is used instead of the .get() method. For more information regarding 
> AWQL, you may refer to this discussion 
> <https://developers.google.com/adwords/api/docs/guides/awql#using_awql_in_service_calls>
> .
>
> 2) The AWQL is exaclty equals to equivalent service call without AWQL 
> considering the HTTP request/response?
>
>  As mentioned in my earlier answer, the AWQL can be used in services 
> when developers opt to use the .query() method. If I misunderstood your 
> point, please correct me with more details.
>
> 3) AWQL is more efficient than alternatives methods to query?
>
> AWQL could be considered more efficient as it requires less coding. 
> Depending on the developer, it can be an alternative that they can utilize 
> apart from the Selector fields when using the AdWords API services.
>
> Thanks and regards,
> Peter
> 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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/9ac86c88-8f5e-4c10-9100-4df87a487865%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AWQL x others API methods

2017-10-25 Thread Eduardo Cesar
Hi,

We have some doubts about AWQL. (We are using Python Adwords API)

1) There is something that we can do only using AWQL (That is impossible 
using others services methods)?
2) The AWQL is exaclty equals to equivalent service call without AWQL 
considering the HTTP request/response?
3) AWQL is more efficient than alternatives methods to query?

Regards,

Eduardo Cesar

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/1c1ef2d9-b8ee-4fab-80e3-437dd3890355%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Get and mutate operations is returning 'None' in python api.

2017-10-24 Thread Eduardo Cesar
We have an application that initialize the adwords client as bellow:

self.adwords_client = adwords.AdWordsClient.LoadFromStorage(GOOGLE_ADS_PATH)

Then, a lot of clients are instanced as bellow:

adgroup_client = self.adwords_client.GetService('AdGroupService', version
=SERVICE_VERSION)

Then, we are using this clients to a lot of operations in google api for 
some hours. Operations like get, create, set Adgroups, keywords, Ads.

The robot was running correctly, but since the last week one error is ever 
present in robot:
After a lot of operations (that return the correct results), the api 
fails in ALL calls.
The fail is very strange, because all the code like the bellow one, 
that before was returning correct resulting, returns 'None' for all calls 
after some hours.

selector = {
'fields': ['AdGroupId', 'FinalUrls'],
'predicates': [
{
'field': 'FinalUrls',
'operator': 'CONTAINS',
'values': utm_pattern
},
{
'field': 'Status',
'operator': 'EQUALS',
'values': values_status
}
]
}
page = keyword_service.get(selector)

I can not get more information about the requisitions and I have some 
certain about the code, because this error is only present in log after the 
past week.
My doubt are: 
1 - "Is it possible the client expire (requisitions or time)?" 
2 - "After a lot of requisitions (or time) can the services return 'None' 
for all requisition?"
3 - "None is a possible return in python api for -get- or -mutate- 
operations?"

Thank you, very much.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/e52c9536-f46c-4e38-aa56-b64fe649ceeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is it possible to filter keywords using a adgroup id list?

2017-08-08 Thread Eduardo Cesar
I tried this get query (python wrapper):

selector = {
'fields': ['FinalUrls', 'AdGroupId'],
'predicates': [
{
'field': 'AdGroupId',
'operator': 'EQUALS',
'values': ad_group_id_list
}
]
}

However, I received a 'unexpected erro' in response.
When I change the 'ad_group_id_list' to '[ad_group_id_list[0]]' the query 
returned the correct response. 
Is it possible to filter keywords using a adgroup id list?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/15c8561c-678c-4383-9be5-d9f833a9b1ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is it possible to change the campaign of an Adgroup?

2017-08-08 Thread Eduardo Cesar
How can I change de campaign of a specifc Adgroup. I tried the code bellow, 
but did not work. Error: Server raised fault: '[EntityNotFound.INVALID_ID @ 
operations[0].operand.id; trigger:'AdGroupId: 19961385808']'  (I have 
certain that this Adgroup exists)

def change_campaign(ad_group_service, ad_group_id, campaign_id):
"""Change the campaign id"""
operations = [{
'operator': 'SET',
'operand': {
'id': ad_group_id,
'campaignId': campaign_id
}
}]

ad_group_service.mutate(operations)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/38e2ce27-8a23-47fa-9636-0a0e8863382a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.