Re: CampaignStats returning null from sandbox

2011-10-19 Thread Kory Hansen
I modified the selector and now I am getting back 0.  

It looks like when I try to add a campaign to the sandbox, it is setting the 
CampaignStats object to null.  I found that out when I started debugging my 
code and noticed that CampaignStats is null in the CampaignReturnValue 
object that is returned by CampaignService.mutate.  Just before that call, 
the CampaignStats in my Campaign object is not null and the individual stats 
look correct.

Am I to assume then, that you can't set CampaignStats in the sandbox?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: sandbox: getting ADD_OPERATION_NOT_PERMITTED with both/either clientEmail and clientId

2011-10-19 Thread Anash P. Oommen
Hi,

Working with the sandbox got slightly more complex with v201109 release, 
since clientEmail header is no longer supported. Also, clientId is not the 
right header name, it should be clientCustomerId.

To use the sandbox with v201109, you could follow this sequence:

1. Call getAllCampaigns without any clientCustomerId header. This will give 
you an empty list, but will also initialize the sandbox.
2. Call getAccountHierarchy without any clientCustomerid header. This will 
give you the sandbox accounts, and their customer ids.
3. Call addCampaign with any one of the clientCustomerId returned by the 
previous call.

The detailed logs are given below for your reference, and will work with 
curl. That said, try using a client library for easier development. 
See http://code.google.com/apis/adwords/docs/clientlibraries.html for 
details.


-BEGIN API CALL-

Request
---


?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
soap:Header
RequestHeader xmlns=https://adwords.google.com/api/adwords/cm/v201109;
authToken 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;***/authToken
developerToken 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;***/developerToken
userAgent 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;AwApi-DotNet-0.0.0|INSERT_YOUR_COMPANY_OR_APPLICATION_NAME_HERE/userAgent
/RequestHeader
/soap:Header
soap:Body
get xmlns=https://adwords.google.com/api/adwords/cm/v201109;
serviceSelector
fieldsId/fields
fieldsName/fields
fieldsStatus/fields
/serviceSelector
/get
/soap:Body
/soap:Envelope


Response


soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
soap:Header
ResponseHeader xmlns=https://adwords.google.com/api/adwords/cm/v201109;
requestId0004afa05edd9e080a0c47022468/requestId
serviceNameCampaignService/serviceName
methodNameget/methodName
operations1/operations
responseTime394/responseTime
units1/units
/ResponseHeader
/soap:Header
soap:Body
getResponse xmlns=https://adwords.google.com/api/adwords/cm/v201109;
rval
totalNumEntries0/totalNumEntries
Page.TypeCampaignPage/Page.Type
totalBudget
periodDAILY/period
amount
ComparableValue.TypeMoney/ComparableValue.Type
microAmount0/microAmount
/amount
deliveryMethodSTANDARD/deliveryMethod
/totalBudget
/rval
/getResponse
/soap:Body
/soap:Envelope


-BEGIN API CALL-

Request
---


?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
soap:Header
RequestHeader xmlns=https://adwords.google.com/api/adwords/mcm/v201109;
authToken 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;/authToken
developerToken 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;/developerToken
userAgent 
xmlns=https://adwords.google.com/api/adwords/cm/v201109;AwApi-DotNet-0.0.0|INSERT_YOUR_COMPANY_OR_APPLICATION_NAME_HERE/userAgent
/RequestHeader
/soap:Header
soap:Body
get xmlns=https://adwords.google.com/api/adwords/mcm/v201109;
selector
enablePagingfalse/enablePaging
/selector
/get
/soap:Body
/soap:Envelope


Response


soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
soap:Header
ResponseHeader 
xmlns:ns2=https://adwords.google.com/api/adwords/cm/v201109; 
xmlns=https://adwords.google.com/api/adwords/mcm/v201109;
ns2:requestId0004afa05f1557a80a836329419f/ns2:requestId
ns2:operations0/ns2:operations
ns2:responseTime16016/ns2:responseTime
ns2:units0/ns2:units
/ResponseHeader
/soap:Header
soap:Body
getResponse xmlns=https://adwords.google.com/api/adwords/mcm/v201109; 
xmlns:ns2=https://adwords.google.com/api/adwords/cm/v201109;
rval
accounts
customerId6125775089/customerId
loginclient_1+/login
companyName/
canManageClientsfalse/canManageClients
/accounts
accounts
customerId4356359989/customerId
loginclient_2+/login
companyName/
canManageClientsfalse/canManageClients
/accounts
accounts
customerId2586944889/customerId
loginclient_3+/login
companyName/
canManageClientsfalse/canManageClients
/accounts
accounts
customerId9817529789/customerId
loginclient_4+/login
companyName/
canManageClientsfalse/canManageClients
/accounts
accounts
customerId5964195538/customerId
loginclient_5+/login
companyName/
canManageClientsfalse/canManageClients
/accounts
links
managerId
id0/id
/managerId
clientId
id6125775089/id
/clientId
typeOfLinkESTABLISHED/typeOfLink
descriptiveName/
Link.TypeLink/Link.Type
/links
links
managerId
id0/id
/managerId
clientId
id4356359989/id
/clientId
typeOfLinkESTABLISHED/typeOfLink
descriptiveName/
Link.TypeLink/Link.Type
/links
links
managerId
id0/id
/managerId
clientId
id2586944889/id
/clientId
typeOfLinkESTABLISHED/typeOfLink
descriptiveName/
Link.TypeLink/Link.Type
/links
links

Re: [PHP] Using the AdHoc reporting

2011-10-19 Thread Anash P. Oommen
Hi Stephen,

We will add support for oAuth based report download in our client libraries 
soon. That said, the error you are seeing in your original post is due to an 
invalid ClientLogin token.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: CampaignStats returning null from sandbox

2011-10-19 Thread Anash P. Oommen
Hi Kory,

CampaignStats is readonly, you can't set stats either in sandbox or in 
production. If you need to specifically test for non-zero campaignstats, you 
need to run your code example against a production campaign that has some 
clicks and impressions.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Get domain list by keyword search?

2011-10-19 Thread sleepyguy
There's nothing in the Adwords API that would do this.

There used to be some APIs from Google that would give you search
results, but I don't think they exist anymore.


On Oct 18, 1:34 pm, eric haberman haberma...@gmail.com wrote:
 Hey gents,

 Is there a method in the AdWords API that would allow me to find the
 'top returned domains' for a keyword search?

 Example

 Keyword:  car tires

 Result: discounttires.com, sears.com, checkerauto.com

 It seems like this would be a basic search, but I can't find it in the
 API docs ... perhaps I'm blind?

 Thanks

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


AuthenticationError.NOT_ADS_USER

2011-10-19 Thread famS Dev
Hi Team,

I'm using the AdWords Sandbox API for the first time. I'm using the
java client library(V201101) to access the API. When I tried  calling
the TargetingIdeaService service, I'm getting the
AuthenticationError.NOT_ADS_USER error.

Error:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode:
 faultString: AuthenticationError.NOT_ADS_USER @ ;
trigger:'843246365515' Service[TargetingIdeaService.get]
 faultActor:
 faultNode:
 faultDetail:
{https://adwords.google.com/api/adwords/o/v201101}
ApiExceptionFault:
ns2:messageAuthenticationError.NOT_ADS_USER @ ;
trigger:'843246365515'
Service[TargetingIdeaService.get]
/ns2:message
ns2:ApplicationException.TypeApiException/
ns2:ApplicationException.Type
ns2:errors xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:type=ns2:AuthenticationError
ns2:fieldPath/
ns2:trigger843246365515/ns2:trigger
ns2:errorStringAuthenticationError.NOT_ADS_USER/ns2:errorString
ns2:ApiError.TypeAuthenticationError/ns2:ApiError.Type
ns2:reasonNOT_ADS_USER/ns2:reason
/ns2:errors


Please provide me the sample java code for access the SandBox
URL(https://adwords-sandbox.google.com/) .

 I'm stuck and not sure what I'm doing wrong. It would be great if
someone could point me in the right direction.

Thanks in advance

Regards,
famS Dev

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


How to get remaining budget for the account

2011-10-19 Thread Chaindler
How to get the remaining budget for the account via adwords API? Is it
possible?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: sandbox: getting ADD_OPERATION_NOT_PERMITTED with both/either clientEmail and clientId

2011-10-19 Thread Piotr Szotkowski
Anash P. Oommen:

 Working with the sandbox got slightly more complex with v201109
 release, since clientEmail header is no longer supported. Also,
 clientId is not the right header name, it should be clientCustomerId.

Thanks! I guess the example at
http://code.google.com/apis/adwords/docs/#soap
uses the newest API version with old
XML and hence my misadventures, then.

 To use the sandbox with v201109, you could follow this sequence:

 1. Call getAllCampaigns without any clientCustomerId header. This
 will give you an empty list, but will also initialize the sandbox.

This worked with your example, thanks!

 2. Call getAccountHierarchy without any clientCustomerid header.
 This will give you the sandbox accounts, and their customer ids.

This didn’t work; with the XML examples you sent
I’m getting ‘Unmarshalling Error: unexpected element
(uri:https://adwords.google.com/api/adwords/mcm/v201109;,
local:RequestHeader)’, with the suggestion that the URI
for RequestHeader should end with …/cm/v201109, not …/mcm/v201109.

Changing the xmlns of RequestHeader to …/cm/v201109
makes the response say ‘Unexpected wrapper element
{https://adwords.google.com/api/adwords/mcm/v201109}get found.’

Changing the get’s xmlns to end with …/cm/v201109 yields
‘Unmarshalling Error: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'selector'.’

Changing selector to the suggested serviceSelector
yields ‘Unmarshalling Error: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'enablePaging'.’

Changing enablePaging…/enablePaging to paging/ (as
it’s element-only) yields SelectorError.MISSING_FIELDS.

I stopped ‘fixing’ stuff here as I guess
I went too far in the wrong direction by now. :)

Are you sure the second request example (the
only one with …/mcm/v201109 xmlnses) is valid?

 The detailed logs are given below for
 your reference, and will work with  curl.

Maybe I’m using curl wrong? The first request+respone worked, the
second broke as described above. I’m calling it like in the tutorial:

curl --header Content-Type: application/soap+xml --data @2.xml 
https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService

 That said, try using a client library for easier development.

That’s the plan (the Ruby lib in my case), except I noticed it
doesn’t support v201109 yet (please correct me if I’m wrong here).

I need per-location keyword stats – and to the best of my reading
of release notes Location was added to TrafficEstimatorService in
v201109 (again, I’d love to be wrong).

— Piotr Szotkowski
-- 
7.times{k=0;puts ($*.map!{|i|k+k=i}1)* }





signature.asc
Description: Digital signature


Re: Error: !!!2|||-1|||Improperly formatted report request??? for AdHoc Reports Service

2011-10-19 Thread Eric Koleda
Also, it's worth noting that the report download servlet enforces XML 
validation like the v201109 SOAP services do.  This means that elements must 
appear in the correct order as defined by the WSDL.

Best,
- 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: [PHP] Using the AdHoc reporting

2011-10-19 Thread Stephen Yeargin
Finally got it up and running. In the code below, $AdWordsUser is an 
instances of AdsUser() that has already been authenticated via OAuth.

/* Authentication Headers */
$headers = array();
$url = 'https://adwords.google.com/api/adwords/reportdownload/v201109';
$oauthInfo = $AdWordsUser-GetOAuthInfo();
$oauthParameters = OAuthUtils::GetSignedRequestParameters($oauthInfo, $url);
$OAuthHeader = OAuthUtils::FormatParametersForHeader($oauthParameters);

$headers[] = 'Authorization: OAuth ' .  $OAuthHeader;
$headers[] = 'clientCustomerId: ' . $AdWordsUser-GetClientId();
$headers[] = 'returnMoneyInMicros: true';

Passing all of that through to the cURL example I posted earlier finally 
yielded a CSV report. Thanks for the tips!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Error: !!!2|||-1|||Improperly formatted report request??? for AdHoc Reports Service

2011-10-19 Thread Eric Koleda
Hi All,

Unfortunately there are some problems with the sample report definition that 
we posted, and we're working to fix that.  In the mean time, below is the 
raw HTTP logs for a successful request that uses the encoding 
application/x-www-form-urlencoded.

Best,
- Eric Koleda, AdWords API Team

POST https://adwords.google.com/api/adwords/reportdownload/v201109 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: gzip
returnMoneyInMicros: false
Content-Type: application/x-www-form-urlencoded
Authorization: GoogleLogin auth=DQAA...
clientCustomerId: 832-...
Host: adwords.google.com
Content-Length: 710

__rdxml=%3CreportDefinition%3E+++%3Cselector%3E+%3Cfields%3ECampaignId%3C%2Ffields%3E+%3Cfields%3EId%3C%2Ffields%3E+%3Cfields%3EImpressions%3C%2Ffields%3E+%3Cfields%3EClicks%3C%2Ffields%3E+%3Cfields%3ECost%3C%2Ffields%3E+%3Cpredicates%3E+++%3Cfield%3EStatus%3C%2Ffield%3E+++%3Coperator%3EIN%3C%2Foperator%3E+++%3Cvalues%3EENABLED%3C%2Fvalues%3E+++%3Cvalues%3EPAUSED%3C%2Fvalues%3E+%3C%2Fpredicates%3E+++%3C%2Fselector%3E+++%3CreportName%3ESample+Report%3C%2FreportName%3E+++%3CreportType%3EADGROUP_PERFORMANCE_REPORT%3C%2FreportType%3E+++%3CdateRangeType%3ELAST_7_DAYS%3C%2FdateRangeType%3E+++%3CdownloadFormat%3ECSV%3C%2FdownloadFormat%3E+%3C%2FreportDefinition%3E+

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Get Campaign details for each month in a single call

2011-10-19 Thread Ronn Chopra
Hi Anash. 

Thank you for your response. Is it also possible to get the *same *information 
for *all *clients (if I have more than 1 in my MCC) using the report? I 
couldn't see any documentation for that.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: AdWords API v201109 is now available

2011-10-19 Thread Neha Bansal
Hi Kevin,

Apologies for late reply. I tried it again but i noticed that i missed
'TargetContentNetwork','TargetContentContextual','TargetPartnerSearchNetwork'
in selector which was returning these as null.
My bad.

Can you check the request 0004ae1739eaaf080a0cea013a0b which tries
to set both Desktop and high end mobile as platform target but is not
able to?


Thanks
Neha

On Oct 12, 11:20 am, Kevin Winter kevin.win...@google.com wrote:
 Hi Neha,
   targetPartnerSearchNetwork is only available to a very small subset of
 customers.  Setting this along with other settings will cause this error.
  Assuming you have tried to just set targetContentNetwork
 or targetContentContextual in a single request, could you provide a
 requestId of a failed request?  It should work.

 - Kevin Winter
 AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Anyone able to access the API in an Obj-C (iOS) project?

2011-10-19 Thread Van Du Tran
Hi,

I'm building an iOS project that will access the AdWords API. There's ZERO 
documentation on this, so I'd like to know if anyone successfully built one?

Thanks!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Anyone able to access the API in an Obj-C (iOS) project?

2011-10-19 Thread Van Du Tran
Any help or guidance would be appreciated.

Thanks!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Getting UNSUPPORTED_TYPE_IS_USED errors when using Traffic Estimator Service with location or language criteria.

2011-10-19 Thread bfrancis...@gmail.com
I am attempting to extract a series of traffic estimations for
keywords, using the same location filter I could use on the traffic
estimator service page. (location: US) with the new 201109 API release
( 
http://code.google.com/apis/adwords/docs/reference/v201109/TrafficEstimatorService.CampaignEstimateRequest.html
).

Looking up the CriteriaID for the united states on
http://code.google.com/apis/adwords/docs/appendix/countrycodes.html, I
see that the CriteriaID is 2840.
With this information, I constructed the following SOAP message:


?xml version=1.0 encoding=UTF-8?
soap:Envelope xmlns:namesp1=https://adwords.google.com/api/adwords/o/
v201109 xmlns:namesp2=https://adwords.google.com/api/adwords/cm/
v201109 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
soap:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
   soap:Header
  namesp1:RequestHeader
 namesp2:authToken/namesp2:authToken
 namesp2:clientCustomerId**/
namesp2:clientCustomerId
 namesp2:developerToken**/
namesp2:developerToken
 namesp2:userAgent**/namesp2:userAgent
  /namesp1:RequestHeader
   /soap:Header
   soap:Body
  namesp1:get
 namesp1:selector
namesp1:campaignEstimateRequests
   namesp1:EstimateRequest.TypeCampaignEstimateRequest/
namesp1:EstimateRequest.Type
   namesp1:adGroupEstimateRequests
 
namesp1:EstimateRequest.TypeAdgroupEstimateRequest/
namesp1:EstimateRequest.Type
  namesp1:keywordEstimateRequests
 
namesp1:EstimateRequest.TypeKeywordEstimateRequest/
namesp1:EstimateRequest.Type
 namesp1:keyword
namesp2:textla vega isd/namesp2:text
namesp2:matchTypeBROAD/namesp2:matchType
 /namesp1:keyword
 namesp1:maxCpc
namesp2:ComparableValue.TypeMoney/
namesp2:ComparableValue.Type
namesp2:microAmount2/
namesp2:microAmount
 /namesp1:maxCpc
  /namesp1:keywordEstimateRequests
   /namesp1:adGroupEstimateRequests
   namesp1:criteria
  namesp2:id2840/namesp2:id
  namesp2:Criterion.TypeLocation/
namesp2:Criterion.Type
   /namesp1:criteria
/namesp1:campaignEstimateRequests
 /namesp1:selector
  /namesp1:get
   /soap:Body
/soap:Envelope

I left the campaign and adgroup ids blank, because I want traffic
estimates only for the keyword, and I added a criteria at the
campaignEstimateRequest level, so it affects all the keywords.
However, when sending this message, I get an exception:

ns2:ApplicationException.TypeApiException/
ns2:ApplicationException.Type
ns2:errors xsi:type=ns2:RequestError xmlns:xsi=http://
www.w3.org/2001/XMLSchema-instance
 
ns2:fieldPathselector.campaignEstimateRequests[0].criteria.criteria[0]/
ns2:fieldPath
 
ns2:triggercom.google.ads.api.services.campaignmgmt.common.criterion.Criterion/
ns2:trigger
ns2:errorStringRequestError.UNSUPPORTED_TYPE_IS_USED/
ns2:errorString
ns2:ApiError.TypeRequestError/ns2:ApiError.Type
ns2:reasonINVALID_INPUT/ns2:reason
/ns2:errors

If I omit the criteria field, the response is as expected, and I get a
global traffic estimation for the keyword.
Apparently the criteria has an invalid type, but the documentation
specifies that Language and Location are valid criteria to use at this
point. I've been trying to figure this out for a day now, and the
documentation isn't terribly helpful. Can anybody spot what's wrong?

Benjamin

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Using the AdHoc reporting

2011-10-19 Thread Reed
THANK YOU!!  That php code was a great help!  Below is a slightly
modified version of it that doesn't use OAUTH, and saves the csv file.
-reed

?php

/* Replace with legitimate credentials */
$authToken = 'blahblahblah ';
$clientCustomerId = 'xxx-xxx-';

/* Report Definition */
$xml = 'reportDefinition
  selector
fieldsDate/fields
fieldsCampaignId/fields
fieldsAdGroupId/fields
fieldsId/fields

fieldsImpressions/fields
fieldsClicks/fields
fieldsCost/fields
fieldsCriteria/fields
fieldsCriteriaType/fields
fieldsCriteriaDestinationUrl/fields

fieldsStatus/fields

dateRange
  min20111001/min
  max20111031/max
/dateRange
  /selector
  reportNameTest Criteria Report/reportName
  reportTypeCRITERIA_PERFORMANCE_REPORT/reportType
  dateRangeTypeCUSTOM_DATE/dateRangeType
  downloadFormatCSV/downloadFormat
/reportDefinition';

/* Authentication Headers */
$headers = array();
$url = 'https://adwords.google.com/api/adwords/reportdownload/
v201109';
/*
$oauthInfo = $AdWordsUser-GetOAuthInfo();
$oauthParameters = OAuthUtils::GetSignedRequestParameters($oauthInfo,
$url);
$OAuthHeader =
OAuthUtils::FormatParametersForHeader($oauthParameters);
*/

$headers[] = 'Authorization: ' . 'GoogleLogin auth=' .  $authToken;
$headers[] = 'clientCustomerId: ' . $clientCustomerId;
$headers[] = 'returnMoneyInMicros: true';


/* Report Definition */
$post = array();
$post['__rdxml'] = $xml;

/* cURL Request */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://adwords.google.com/api/adwords/
reportdownload/v201109');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

// Get Response
$response = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);


/* Debugging */
print 'preHeaders:br /';
print_r($headers);
print 'hr /XML:br /';
print htmlentities($xml);
print 'hr /';
print 'HTTP Code: ' . $code . 'hr /';
print htmlentities($response);
print 'hr /Errors:br /';
$errors = array( 'errno' = curl_errno($ch), 'error' =
curl_error($ch)) ;
print_r($errors);

print 'hr /Saving File:br /';
$myFile = c:\temp\reed\testFile.csv;
$fh = fopen($myFile, 'w') or die(can't open file);
fwrite($fh, htmlentities($response));
fclose($fh);

$end;

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


v201109 Criteria performance report - automatic placements data?

2011-10-19 Thread Reed
I just pulled a criteria performance report for a client with
automatic placements. It appears that automatic placements data is not
broken out in this report as had been expected (after all, that was
one of the big deficiencies in the previous version of the reporting
system).  In fact, it looks a lot like V13 - everything is rolled into
a keyword called content with and Id of 300 and is given a
criteriatype of keyword.

I looked at data for yesterday, where everything is still in the
Other domains bucket on the UI, and there is a single row as
described above with the data shown in the UI for other domains.  I
then tried for 2 days ago, since on the UI some of its other domains
data has begun to move to specific domains, and there is still only a
single content data line which represents all of the automatic
placement data.

I tried a different account that has managed placements, and each of
the managed placements shows up in the criteria performance report as
an individual line with placement for the criteriatype.

Does this mean that we are still going to have to piecemeal reports
together just to get all of the data in one place, and will still have
to do the automatic placements magic each day to figure out what
data has moved out of other domains and into specific domains? I had
thought that this new criteria report was supposed to have the detail
data for everything in one place.

Have not yet tried pulling for an account that has remarketing data.

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: Error: !!!2|||-1|||Improperly formatted report request??? for AdHoc Reports Service

2011-10-19 Thread Dave L
Hi Eric,

Thanks for your help and it works fine now.

Just one more question: the AdHoc report service documentation states
that we need to call the GET request to
https://adwords.google.com/api/adwords/reportdownload?__rd=REPORT_DEFINITION_ID
to download the report. However, it seems that the HTTP Post request
will return the report data directly, is that correct?

Regards,
David




On Oct 20, 1:20 am, Eric Koleda eric.kol...@google.com wrote:
 Also, it's worth noting that the report download servlet enforces XML
 validation like the v201109 SOAP services do.  This means that elements must
 appear in the correct order as defined by the WSDL.

 Best,
 - 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