Re: [0-57398518] Rails Client API Multiple Metric Issue

23 views
Skip to first unread message

David A Fritz

unread,
Sep 28, 2012, 8:20:36 AM9/28/12
to adsen...@googlegroups.com
Sérgio,

Yes, I meant the rails client api, sorry.  Should I post this in the client api issues tracker? The issues is only with adsense from what I have found so far, I have no problems with metrics on other apis. 

Dave



On Sep 28, 2012, at 6:56 AM, adsen...@googlegroups.com wrote:

Hi David,

When you say you're using the "rails client api", do you mean the Google APIs client library at http://code.google.com/p/google-api-ruby-client/ ?

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


---
On 09/26/12 21:43:09 "David Fritz" <daf...@gmail.com> wrote:
I am using the rails client api, and having issues while requesting multiple metrics. If I pass one metric I get a report.
result = api_client.execute({
    :api_method => adsense.reports.generate,
     :parameters => {'startDate'=> @start_date, 'endDate' => @end_date, 'accountId' => @id, 
       'metric' =>['EARNINGS'],
       'dimension' => "MONTH"
          }
   })

However if I pass in multiple metrics, my report is empty. 

result = api_client.execute({
    :api_method => adsense.reports.generate,
     :parameters => {'startDate'=> @start_date, 'endDate' => @end_date, 'accountId' => @id, 
       'metric' =>['CLICKS','PAGE_VIEWS','PAGE_VIEWS_CTR','PAGE_VIEWS_RPM','EARNINGS'],
       'dimension' => "MONTH"
          }
   })

I read a similar bug in the PHP library which appears to be fixed now and was wondering if this is a bug, or I am doing something silly that is preventing me from getting a report.  Thanks! 

--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/adsense-api/-/i6hsBxeKcjQJ.
To post to this group, send email to adsen...@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.

Michael Ni

unread,
Nov 7, 2012, 10:29:16 PM11/7/12
to adsen...@googlegroups.com
I'm having the same issue

this works
'metric' => %w(EARNINGS),

this doesn't
'metric' => %w(CLICKS EARNINGS),

this works as well
'metric' => %w(CLICKS),

Mike
Reply all
Reply to author
Forward
0 new messages