.net Client library v201209 Reporting issue

86 views
Skip to first unread message

Subrata Sarkar

unread,
Apr 29, 2013, 2:05:50 AM4/29/13
to adwor...@googlegroups.com
Hello,

First of all my apology if the questions look silly. I am fairly new to Adwords API.
I am trying to generate different reports using .net client library v201209 (referring: https://developers.google.com/adwords/api/docs/appendix/reports). Repors I want are:

- Ad Performance Report
- Adgroup Performance
- CampaignPerformance
- AccountPerformance
- Keyword Performance

I am having the following issues:.

1. When I use LAST_MONTH, I am only getting the data for the 1st day of the same month, means, if the last month is March, I am only getting data for March 01, 2013

2. Cost (Amount spent) and Clicks are always coming as 0 in all reports except KEYWORD_PERFORMANCE_REPORT

3. I am using ClientCustomerId before calling any report in the following fashion
           var config = new AdWordsAppConfig
            {
                ClientCustomerId = ClientCustomerId,
                Email = AuthenticationEmail,
                //ClientEmail = AuthenticationEmail, (Because ClientEmail is not supported in the header of v201209)
                Password = AuthenticationPassword,
                DeveloperToken = DeveloperToken,
            };
So, I assumed that I will get data (report) for all sub-accounts associated with the ClientCustomerId.
But in practice I am only getting data for only one account. ClientCustomer Id I am using has 37 accounts.

Please help. I am completely stuck and in a real urgency :(
Please let me know if I should provide the classes I developed for fetching reports.


Best regards,
Subrata.



Takeshi Hagikura (AdWords API Team)

unread,
Apr 30, 2013, 2:33:09 AM4/30/13
to adwor...@googlegroups.com
Hi,

1.  
Do you have stats other than March 1st? 
If yes, can you please share the request xml and clientCustomerId you targeted? 

2.
Similar to question 1. Are there any clicks between the time range you pulled the report?

3. 
AdHoc reports are targeted to pull a report for a single clientCustomerId. 
If you want to pull all the accounts, please download a report for each clientCustomerId.

Best,
- Takeshi

Niladri Sarkar

unread,
Apr 30, 2013, 8:31:21 AM4/30/13
to adwordsapiad...@google.com, adwor...@googlegroups.com

Hi Takeshi,

Thanks for your response.

 

1.  I have data for February 01-28, 2013. Please see the attachments

2.  I checked in MCC console and there are Clicks and Cost > 0 for the above mentioned time span

3.  I am migrating to v201302 and trying to pull up AdHoc report, but getting some trouble in sending the data to POST. I have attached the file too.

a.  I have a confusion. The Client Customer id is the one displayed at top right corner of MCC console after I log in? Actually when I log in I see a list of accounts which have different Ids. I think you are asking me to use these Ids. But how I get those ids against the master id?

 

Regards,

Subrata Sarkar

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Google-Account-Performance-data.txt
Google-Ad-Performance-data.txt
Google-Campaign-Performance-data.txt

Takeshi Hagikura (AdWords API Team)

unread,
May 1, 2013, 12:44:16 AM5/1/13
to adwor...@googlegroups.com, adwordsapiad...@google.com
Hi Subrata,

1. 
I'm not 100% sure what data specifically you are talking about. 
As I wrote in the previous response, can you please tell me your clientCustomerId (10 digits like xxx-xxx-xxxx) and the requested report definition (xml or AWQL String)?

2. 
I see non zero data for clicks and costs in the attached files.
What data are you exactly talking about?

3. 
Yes, clinentCustomerId is the 10 digit number like xxx-xxx-xxxx. 
Each client account has that number and Adhoc Reports should be target each clientCustomerId.

Best,
- Takeshi

Niladri Sarkar

unread,
May 1, 2013, 8:24:43 AM5/1/13
to adwordsapiad...@google.com, adwor...@googlegroups.com

Hi,

 

The Customer Id is 3871583631
I also am trying to use Ad Hoc reporting with v201302 but getting 400 Bad Request at this line using (var httpWebResponse = request.GetResponse() as HttpWebResponse) 
Class Google.AdPerformanceReport.cs under classes folder has two methods of which the 2nd one DownloadReport() is copied form https://gist.github.com/ElvisLives/1287940
Only thing I changed is the version in (i.e. https://adwords.google.com/api/adwords/reportdownload/v201302)
 
I must be doing something wrong but could not figure out where.
 
Regarding the XML reports I sent earlier, I can see data for clicks and cost in MCC console for February 2013.
I am new to Adwords. Please help.
 

----------------------------------------------------------------------------------------------

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/SGDdUUrMaFY/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.

GoogleAdwords.201302.zip

Niladri Sarkar

unread,
May 1, 2013, 9:02:39 AM5/1/13
to adwordsapiad...@google.com, adwor...@googlegroups.com

Hi,

I have just seen one thing. Please see the attached screenshot.

“The stream does not support seek operations”. What is that? I think this is the reason why I am getting the Bad Request exception.

 

----------------------------------------------------------------------------------------------

Best Regards,

Subrata Sarkar

 

From: adwor...@googlegroups.com [mailto:adwor...@googlegroups.com] On Behalf Of Takeshi Hagikura (AdWords API Team)


Sent: Wednesday, May 01, 2013 10:14 AM
To: adwor...@googlegroups.com
Cc: adwordsapiad...@google.com

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/SGDdUUrMaFY/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.

seek-error.png
Message has been deleted

Anash P. Oommen (AdWords API Team)

unread,
May 1, 2013, 12:14:41 PM5/1/13
to adwor...@googlegroups.com, adwordsapiad...@google.com
Hi Subrata,

I think part of the problem is that you used a nuget package rather than the standard client library download, so you never got to see the code examples. You can refer to https://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/examples/adwords/CSharp/v201302/Reporting/DownloadCriteriaReport.cs for a code example.on how to use the reports. Takeshi has answered some of your questions, but I'll summarize them below for easy reference.

1.  AdWords API doesn't run reports at MCC level. You should run https://code.google.com/p/google-api-adwords-dotnet/source/browse/trunk/examples/adwords/CSharp/v201302/AccountManagement/GetAccountHierarchy.cs at the MCC level to retrieve all your client accounts, and then run reports for each one of them separately.

2. Error 400 means that there is something wrong with the request (usually a wrong field in the report definition xml, may be structural, may be an unsupported column...). If you use the client library, you will get a ReportsException with more details; if you choose to write your own solution (e.g. use a modified version of https://gist.github.com/ElvisLives/1287940), then you should do something like:

WebResponse resp = null;
try {
  webResponse = request.GetWebResponse();
} catch (WebException e) {
   webResponse = e.Response;
}

using (StreamReader reader = new StreamReader(e.GetResponseStream()) {
  contents = reader.ReadToEnd();
  // If you got an exception, this will be an xml that describes the error. 
  // If this is a valid request, then this will be the report.
}

My recommendation would be to use the client library, since most of these details are taken care for you.

3. HttpWebResponse is not a seekable stream. That is not related to the error you are facing.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Niladri Sarkar

unread,
May 1, 2013, 12:36:30 PM5/1/13
to adwordsapia...@google.com, adwor...@googlegroups.com, adwordsapiad...@google.com

Thank you once again Anash. I will try your way and see how it comes up J

Reply all
Reply to author
Forward
0 new messages