I am trying to connect to the Google Analytics api. My ultimate goal is to add a goal automatically, but I cannot even HelloAnalytics to work. I have followed the explicit tutorial here.
My require once did not work at first because the tutorial links to paths that cannot be found. So I had to make a guess at which files to link to. I tried the following:
require_once '/classes/google-api-php/src/Google/Client.php';
require_once '/classes/google-api-php/src/Google/Service/Analytics.php';
I then get the following error:
Fatal error: Class 'Google_Service' not found in C:\xampp\htdocs\google-api-test\classes\google-api-php\src\Google\Service\Analytics.php on line 32
I have a feeling the tutorial needs to be updated to match the library. At the moment I am stuck confused.