kotmyrevich / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Analytics PHP library documentation does not work #768

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Name of related component: Documentation

URL of the documentation page : 
https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/s
ervice-php

Issue summary:
1. Follow directions on 
https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/s
ervice-php, copy+paste the contents for HelloAnalytics.php
2. Run HelloAnalytics.php with php HelloAnalytics.php

Expected output:
Output of the analytics call

Actual results:
Warning: require_once(google-api-php-client/src/Google/autoload.php): failed to 
open stream: No such file or directory in 
/private/var/www/meylah-dev/HelloAnalytics.php on line 8

Fatal error: require_once(): Failed opening required 
'google-api-php-client/src/Google/autoload.php' (include_path='.:') in 
/private/var/www/meylah-dev/HelloAnalytics.php on line 8

Notes:
The example needs to be updated to v2 of the API client, or tell people they 
need to do a "git checkout v1-master" on the cloned library from git.  The 
documentation at 
https://developers.google.com/api-client-library/php/start/get_started should 
also be updated to reflect this.

From some digging I found that v2 was not actually marked as stable which is 
why the documentation is not updated. As such it should probably be developed 
on (say) v2-master rather than in the master branch.

Original issue reported on code.google.com by meylah_...@meylah.com on 30 Oct 2015 at 3:50

GoogleCodeExporter commented 8 years ago
Thanks for reporting this: the docs have been updated to properly checkout the 
v1-master tagged branch

git clone -b v1-master https://github.com/google/google-api-php-client.git

if you have already cloned the repository you can fix this by checking out the 
correct branch

git checkout -b v1-master

Original comment by mcoh...@google.com on 2 Nov 2015 at 5:39