0
votes

Trying to use Google Analytics Reporting API V3 sample with javascript and running into problems.

So when trying to use google's sample "hello_analytics_api_v3" the javascript breaks with the following errors.

"GET https://www.googleapis.com/discovery/v1/apis/analytics/v3/rpc?fields=methods%2F%2Fid&pp=0&key=**** 400 (Bad Request)" and then when clicking on run demo "Uncaught TypeError: Cannot read property 'management' of undefined".

It would seem that since the last update alot of people are getting this problem but was wondering if anyone has worked around a working sample.

Alex

1
Currently there is a lot of developers in the same boat.. Let’s stay politically correct and say that the current state of the Analytics Reporting API is "Un-google like". Sure it’s only in beta but a complex api with no new samples to reflect major updates, un-clear documentation and almost no feedback from the team creates a mess. Like many others I had a working sample prior to 3.0.103 and still trying to migrate. Probably not the answer you were looking for but I would keep an eye on the analytic reporting group the google guys will eventually put something out. - John tucker
Thanks John, can we currently use a working sample that is using V2 untill we can make a working sample with V3? - user1697748

1 Answers

1
votes

its your api key guys, you need to create a new key under "Public API access" section and use the key provided as your apiKey. Don't use the Client Secret as the apiKey.