Re: V201206 old java client library Report Definition selector fields and predicates

2012-09-27 Thread Jason Stedman
Christian,

This is more a java suggestion than anything to do with AdWords as your 
posted code works, but I think it is aligned with the nature of the 
question.

A cleaner way to handle this would be to extract the array of strings out 
of the constructor calls and setter methods and instead make them fields of 
your class. This also saves on garbage collection overhead if you make 
multiple calls to that method reusing the same instance of your class. I 
feel this will also make the code much more maintainable in the future.

You can then abstract the logic out to something like this(which addAll 
most likely does anyway under the covers):

{
// class level declarations to save on garbage collection for things that 
are always initialized with the same value in a particular method
String[] fieldsInReport = new String[] {AdGroupId, KeywordId, Id, 
Impressions, Clicks, Cost, AveragePosition, Date};
String[] predicateValues = new String[] {ENABLED, PAUSED, DISABLED};
...

// inside the method which uses the arrays of Strings
for(String field : fieldsInReport){
fields.add(field);
}
statusPredicate = new Predicate();
statusPredicate.setField(Status);
statusPredicate.setOperator(PredicateOperator.IN);
ListString values = statusPredicate.getValues();
for(String value : predicateValues){
values.add(value);
}
}

AdWords team : While thinking about this question I noticed the 
documentation is broken for the new Selector class in 
ReportDefinitionService:

https://developers.google.com/adwords/api/docs/reference/latest/ReportDefinitionService.Selector

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


bonjour , je chercche une personne , qui accepte de m'aider par skype pour gérer mon website

2012-09-27 Thread ahmed ben nefissa
bonjour , je cherche une personne qui accepte de m'aider a  mettre sur pied 
 mon compte adsense .grace au skype
merci de  me répondre

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Recovering from production error: UNEXPECTED_INTERNAL_API_ERROR

2012-09-27 Thread Jeremy Aube
What's the best way to recover from an UNEXPECTED_INTERNAL_API_ERROR in 
production? Should we treat it as an intermittent error and resubmit the 
job after 30 seconds? Or has the job possibly gone through anyway?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Re: Getting AdMob usage data?

2012-09-27 Thread Reed Powell
Ping, any update on this? I can see the admob data in a Managed Placements
Performance report, but am not sure how to be able to identify it 100% of
the time, so that I only load the admob data and not the other managed
placement data (because that data is also present in the Criteria
Performance Report and gets loaded from there).  I can see my current admob
data because we put admob into the campaign name, but that's not very
reliable for the long term.  So, what is the Google advice on filtering out
(either on the request end, or on my end once I receive the unfiltered
data) the admob data from the Management Placements Report?

thanks
reed

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Re: Video campaigns statistics

2012-09-27 Thread Rem
Hi Kevin,

Seems I can see video campaign statistics now on MCC level, can you confirm 
this is correct across the board?

Thanks,
Rem

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Can't specify an Adgroup Status selector on AdGroupCriterionService. Stuck for a solution.

2012-09-27 Thread Oliver
We're trying to use the AdgroupCriterionService to get some information 
about *active *keywords only.  We're using the 'Status' selector field to 
ensure only data for active keywords are returned.

However, there are deleted Adgroups whose keywords are still in 'active' 
status.  Adwords users typically just pause or delete an adgroup without 
having to change the status of each keyword inside it.

As you can guess, the issue we now have is we're getting back data for 
these active keywords that are in the deleted adgroups!

I can't see any selector field that we can use to filter by the Adgroup 
status as well.

Any ideas how we can get round this issue please?  Is there any other way 
we can target only the truly active keywords in the campaign?

Thanks in advance for any help with this.

Oliver

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


OAuth2 in the new Java client library

2012-09-27 Thread j.e.frank
I'm looking at migrating to the new Java client library as part of the 
upgrade from v201109.  One thing I thought was going to be a benefit of 
this migration was long-lived access tokens, to enable long-running 
services to use the API without having to worry about refreshing the 
ClientLogin token.  Now that I've done some more digging, it appears that 
OAuth2 doesn't have long-lived tokens.  Instead, you get an access token 
and a refresh token, and there is some way that an expired access token 
gets refreshed behind the scenes.

I'm unclear on the implications of this for how I can deploy multiple 
services that use the API without any user interaction.  I have 
successfully followed the OAuth2 example to get an authorization code using 
a browser, and then I can take that code and get a credential with an 
access and refresh token.  Subsequently, I can create an OAuth2 credential 
from these 2 tokens, without using the browser to get a new authorization 
code.  However, this doesn't work after some period of time -- I have to 
start over and get a new authorization code using the browser.  I've seen 
reference to the CredentialsStore where you keep track of new 
access/refresh tokens as they change, which would be fine for a single 
service to manage.  But with multiple services, would I need a centralized 
CredentialsStore that they would all share, so that each one gets the 
latest token?  That's a non-starter for me.  Is there something I'm missing 
about how I can use OAuth2 with multiple long-lived services?  Otherwise I 
am going to continue with ClientLogin, and give up on my dream of 
non-expiring tokens.  Or is there some way of re-obtaining an authorization 
token without user interaction?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Re: OAuth2 in the new Java client library

2012-09-27 Thread Oliver
Excellent questions, and I hope someone can answer them soon.

Do your servcies not access a shared database to store a common token to be 
used by all services?

Oliver

On Thursday, September 27, 2012 7:24:50 PM UTC+1, j.e.frank wrote:

 I'm looking at migrating to the new Java client library as part of the 
 upgrade from v201109.  One thing I thought was going to be a benefit of 
 this migration was long-lived access tokens, to enable long-running 
 services to use the API without having to worry about refreshing the 
 ClientLogin token.  Now that I've done some more digging, it appears that 
 OAuth2 doesn't have long-lived tokens.  Instead, you get an access token 
 and a refresh token, and there is some way that an expired access token 
 gets refreshed behind the scenes.

 I'm unclear on the implications of this for how I can deploy multiple 
 services that use the API without any user interaction.  I have 
 successfully followed the OAuth2 example to get an authorization code using 
 a browser, and then I can take that code and get a credential with an 
 access and refresh token.  Subsequently, I can create an OAuth2 credential 
 from these 2 tokens, without using the browser to get a new authorization 
 code.  However, this doesn't work after some period of time -- I have to 
 start over and get a new authorization code using the browser.  I've seen 
 reference to the CredentialsStore where you keep track of new 
 access/refresh tokens as they change, which would be fine for a single 
 service to manage.  But with multiple services, would I need a centralized 
 CredentialsStore that they would all share, so that each one gets the 
 latest token?  That's a non-starter for me.  Is there something I'm missing 
 about how I can use OAuth2 with multiple long-lived services?  Otherwise I 
 am going to continue with ClientLogin, and give up on my dream of 
 non-expiring tokens.  Or is there some way of re-obtaining an authorization 
 token without user interaction?


-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Re: OAuth2 in the new Java client library

2012-09-27 Thread j.e.frank
Most services do have a shared database, but not all of them.

I continued investigating this issue, and I've also tried the Service 
Account approach which uses a private key instead of getting an 
authorization through a browser URL.  However, this keeps giving me a bad 
grant exception if I try to actually use the credential, so I am not sure 
what I am doing wrong there.

On Thursday, September 27, 2012 3:34:38 PM UTC-4, Oliver wrote:

 Excellent questions, and I hope someone can answer them soon.

 Do your servcies not access a shared database to store a common token to 
 be used by all services?

 Oliver

 On Thursday, September 27, 2012 7:24:50 PM UTC+1, j.e.frank wrote:

 I'm looking at migrating to the new Java client library as part of the 
 upgrade from v201109.  One thing I thought was going to be a benefit of 
 this migration was long-lived access tokens, to enable long-running 
 services to use the API without having to worry about refreshing the 
 ClientLogin token.  Now that I've done some more digging, it appears that 
 OAuth2 doesn't have long-lived tokens.  Instead, you get an access token 
 and a refresh token, and there is some way that an expired access token 
 gets refreshed behind the scenes.

 I'm unclear on the implications of this for how I can deploy multiple 
 services that use the API without any user interaction.  I have 
 successfully followed the OAuth2 example to get an authorization code using 
 a browser, and then I can take that code and get a credential with an 
 access and refresh token.  Subsequently, I can create an OAuth2 credential 
 from these 2 tokens, without using the browser to get a new authorization 
 code.  However, this doesn't work after some period of time -- I have to 
 start over and get a new authorization code using the browser.  I've seen 
 reference to the CredentialsStore where you keep track of new 
 access/refresh tokens as they change, which would be fine for a single 
 service to manage.  But with multiple services, would I need a centralized 
 CredentialsStore that they would all share, so that each one gets the 
 latest token?  That's a non-starter for me.  Is there something I'm missing 
 about how I can use OAuth2 with multiple long-lived services?  Otherwise I 
 am going to continue with ClientLogin, and give up on my dream of 
 non-expiring tokens.  Or is there some way of re-obtaining an authorization 
 token without user interaction?



-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


UNEXPECTED_INTERNAL_API_ERROR with TargetingSettingDetail and AdGroup Service

2012-09-27 Thread eko...@gmail.com

I am submitting the following request to the sandbox:


?xml version=1.0 encoding=utf-8 ?
env:Envelope xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:env=http://schemas.xmlsoap.org/soap/envelope/;
  env:Header
n1:RequestHeader env:mustUnderstand=0
xmlns:n1=https://adwords.google.com/api/adwords/cm/v201206;
  n1:authTokenxxx/n1:authToken
  n1:userAgentyyy/n1:userAgent
  n1:developerToken/n1:developerToken
  n1:clientCustomerIda/n1:clientCustomerId
/n1:RequestHeader
  /env:Header
  env:Body
n2:mutate xmlns:n2=https://adwords.google.com/api/adwords/cm/v201206;
  n2:operations xsi:type=n2:AdGroupOperation
n2:operatorADD/n2:operator
n2:operand
  n2:campaignId774762/n2:campaignId
  n2:namecampaign_adgroup-1:187:1629966937/n2:name
  n2:statusENABLED/n2:status
  n2:settings xsi:type=n2:TargetingSetting
n2:details
  n2:targetAlltrue/n2:targetAll
/n2:details
  /n2:settings
  n2:bids xsi:type=n2:ManualCPCAdGroupBids
n2:keywordMaxCpc
  n2:amount xsi:type=n2:Money
n2:microAmount43/n2:microAmount
  /n2:amount
/n2:keywordMaxCpc
n2:keywordContentMaxCpc
  n2:amount xsi:type=n2:Money
n2:microAmount43/n2:microAmount
  /n2:amount
/n2:keywordContentMaxCpc
  /n2:bids
/n2:operand
  /n2:operations
/n2:mutate
  /env:Body
/env:Envelope


and I am receiving an UNEXPECTED_INTERNAL_API_ERROR as the response.  If i 
remove the targetingsettings, the error goes away. Any help would be 
appreciated.

thank you,
eric

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Re: Can't specify an Adgroup Status selector on AdGroupCriterionService. Stuck for a solution.

2012-09-27 Thread j.e.frank
One idea is, you can first get the list of AdGroups that are Active, using 
the AdGroupService.  Then build a list of the IDs of those ad groups, and 
use it in the selector of the keywords (along with the Status predicate 
that picks only active keywords).

On Thursday, September 27, 2012 12:26:09 PM UTC-4, Oliver wrote:

 We're trying to use the AdgroupCriterionService to get some information 
 about *active *keywords only.  We're using the 'Status' selector field to 
 ensure only data for active keywords are returned.

 However, there are deleted Adgroups whose keywords are still in 'active' 
 status.  Adwords users typically just pause or delete an adgroup without 
 having to change the status of each keyword inside it.

 As you can guess, the issue we now have is we're getting back data for 
 these active keywords that are in the deleted adgroups!

 I can't see any selector field that we can use to filter by the Adgroup 
 status as well.

 Any ideas how we can get round this issue please?  Is there any other way 
 we can target only the truly active keywords in the campaign?

 Thanks in advance for any help with this.

 Oliver


-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Re: Migrating Authorization Mechanics ClientLogin to OAuth2 Google AdWords v201206 Perl

2012-09-27 Thread Etienne Lawlor
It looks like I just needed to have the latest 
HTTP/Message.pmhttp://search.cpan.org/~gaas/HTTP-Message-6.03/lib/HTTP/Message.pm
 v6.0.3 
module installed since the version I had installed did not have the method 
decode() which was being passed to the AUTOLOAD() subroutine in the 
HTTP/Message.pm module.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Is it OK to use the API for the TargetingIdeaService feature only?

2012-09-27 Thread Roy
Hello,

I'd like to know if its ok to apply for an AdWords API if I only want to 
use the TargetingIdeaService?
I want to develop an enhanced Keyword Research tool which add more metrics 
to the suggested keywords TargetingIdeaService provides to make a more 
informed and actionable decision if its worth targeting the keyword (for 
PPC and SEO).

I went over the ToS of the API application, didn't see anything problematic 
with this concept, but I want to double check.

Thanks,

Roy

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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


Re: Perl Client Library 2.7.0 and Authorization Handlers

2012-09-27 Thread Etienne Lawlor
It looks like I just needed to have the latest 
HTTP/Message.pmhttp://search.cpan.org/~gaas/HTTP-Message-6.03/lib/HTTP/Message.pm
 v6.0.3 
module installed since the version I had installed did not have the method 
decode() which was being passed to the AUTOLOAD() subroutine in the 
HTTP/Message.pm module.

So after initializing the Client object like you suggested then I stepped 
through the oauth2 perl example:
http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/examples/v201206/misc/use_oauth2.pl

but the url returned from
$auth_handler-get_authorization_url() 
is an invalid url:

https://accounts.google.com/o/oauth2/auth?response_type=codeclient_id=client_idredirect_uri=urn:ietf:wg:oauth:2.0:oobscope=https%3A%2F%2Fadwords.google.com%2Fapi%2Fadwords%2Faccess_type=offlineapproval_prompt=autostate=

where client_id is my client_id

Is there something else that I am missing?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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