API https://www.google.com/analytics/feeds/data not working
The API we use to get the best performing URLs is now broken.
Details below:
https://www.google.com/analytics/feeds/data
?start-date=2015-05-26
&end-date=2015-05-27
&dimensions=ga:pageTitle,ga:pagePath &metrics=ga:pageviews,ga:visitBounceRate,ga:avgTimeOnSite,ga:uniquePageviews\
&sort=-ga:pageviews\
&filters=ga:pagePath=@-news-
&max-results=10
&ids=ga:5180657
&prettyprint=true
Authorization using CURL:
https://www.google.com/accounts/ClientLogin -s -d
Email=example@gmail.com -d Passwd=****** -d accountType=GOOGLE -d
source=curl-accountFeed-v1 -d service=analytics
Answer from Google:
<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>authError</code>
<location type="header">Authorization</location>
<internalReason>Invalid Credentials</internalReason>
</error>
</errors>
Requesting your help.
Regards, -Amalan.
+3
source to share
1 answer
Client login is out of date. You must migrate your code to use one of the OAuth 2.0 Scenarios .
Recently updated Google Analytics API Quickstart Tooltips . You should see if you can get them to work.
+1
source to share