php - GAPI: Failed to request account data -
exception: gapi: failed request account data. error: " error 404 (not found)!!1 * { 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; } img { border: 0 } @media screen , (max-width:772px) { body { background: none; margin-top: 0; max-width: none; padding-right: 0; } } 404. that's error. requested url /analytics/feeds/accounts/default?start-index=1&max-results=20 not found on server. that's know. "
yes, gapi has not been updated long time, , yes, google provide first-party php library , tutorial. both mess, , way overblown tiny-scale scripts.
but can repair gapi in no time following thread: https://code.google.com/p/gapi-google-analytics-php-interface/issues/detail?id=84
in particular, need patch head of gapi class, replacing following.
const client_login_url = 'https://www.google.com/accounts/clientlogin'; const account_data_url = 'https://www.googleapis.com/analytics/v2.4/management/accounts/~all/webproperties/~all/profiles'; //https://www.google.com/analytics/feeds/accounts/default const report_data_url = 'https://www.googleapis.com/analytics/v2.4/data'; from there on works expected.
Comments
Post a Comment