1

Problem description

I am using Google analytic for show visits/ bounce rates for a website. Before yesterday functionality was working fine. But now I am getting an error

com.google.gdata.util.ResourceNotFoundException: Not Found
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
  </style>
  <a href=//www.google.com/><img src=//www.google.com/images/errors/logo_sm.gif alt=Google></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/analytics/feeds/accounts/default</code> was not found on this server.  <ins>That’s all we know.</ins>

    at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:599)
    at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
    at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
    at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
    at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
    at com.google.gdata.client.Service.getFeed(Service.java:1135)
    at com.google.gdata.client.Service.getFeed(Service.java:998)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:645)
    at com.google.gdata.client.Service.getFeed(Service.java:1017)
    at com.report.utils.GoogleAnlytics.getAvailableAccounts(GoogleAnlytics.java:41)
    at com.report.utils.GoogleAnlytics.run(GoogleAnlytics.java:113)
    at com.report.utils.GoogleAnlytics.main(GoogleAnlytics.java:164)

What I did

I am using account URL

"https://www.google.com/analytics/feeds/accounts/default"

I searched about this issue on internet but couldn't find any solution. What is the problem, and how can I solve?

m.s.
  • 16,063
  • 7
  • 53
  • 88
Ashish Jagtap
  • 2,799
  • 3
  • 30
  • 45
  • 2
    It is gone, baby, gone. See http://stackoverflow.com/questions/12104801/gapi-account-data-url-goes-to-404 –  Aug 24 '12 at 16:18

2 Answers2

3

The feed has been shut down by Google. See Account Feed Shutdown

The Data Export API v2.3 migration has completed and the API has been shutdown. If your application attempts to access the Account Feed it will now receive a 404 error response. To resolve this error, migrate to the Management API to access configuration data.

jk.
  • 14,365
  • 4
  • 43
  • 58
  • 1
    Thanks for your reply i have followed the given link and i have made changes accordingly like follows https://www.googleapis.com/analytics/v2.4/management/accounts?start-index=1&max-results=100&key=API_KEY and Data URL to https://www.googleapis.com/analytics/v2.4/data still i am getting com.google.gdata.util.ParseException: [Line 1, Column 1567, element entry] Required extension element http://schemas.google.com/analytics/2009:tableId not found. – Ashish Jagtap Aug 27 '12 at 06:00
  • after doing some Rnd now I am getting new error as com.google.gdata.util.ServiceForbiddenException: Forbidden GDatainsufficientPermissionsUser does not have permission to perform this operation i don't know what went wrong in code ? – Ashish Jagtap Aug 27 '12 at 10:22
0

follow this https://developers.google.com/analytics/devguides/config/mgmt/v2/mgmtJava change account profile url to https://www.googleapis.com/analytics/v2.4/management/accounts/~all/webproperties/~all/profiles, And use ManagementFeed / ManagementEntry instead of AccountFeed and AccountEntry I have solved my problem :))

user1487380
  • 362
  • 2
  • 9
  • 26