erebusnz / gapi-google-analytics-php-interface

GA:PI() - Google Analytics PHP Interface
167 stars 86 forks source link

Error #144

Closed Edu93 closed 8 years ago

Edu93 commented 8 years ago

Hello, I followed all the steps, but when I tried to use the example.filter.php, the browser showed this massage:

"Parse error: syntax error, unexpected T_FUNCTION in /public_html/gapi_2.0/gapi.class.php on line 294"

What can be wrong?

erebusnz commented 8 years ago

This error means you have PHP version below 5.3.0, please upgrade your PHP to use version 2.0 of the class.

This is because the code on line 294 uses an anonymous function http://php.net/manual/en/functions.anonymous.php

Edu93 commented 8 years ago

Ok, thanks a lot. I guess it worked, because now is showing this message:

Uncaught exception 'Exception' with message 'GAPI: Failed to request report data. Error: "User does not have sufficient permissions for this profile."'

I don't know what happend. I followed all the steps to give all the permissions.