erebusnz / gapi-google-analytics-php-interface

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

Issue with userGender dimension #160

Open drimlike opened 8 years ago

drimlike commented 8 years ago

Hello,

We followed the steps to enable demographics data, we can see data via our analytics dashboard and the Query Explorer. The dimension userGender is working fine via the query explorer tool.

But via the API we are getting:

PHP Fatal error: Uncaught exception 'Exception' with message 'No valid metric or dimesion called "userGender"'

Not sure what we are doing wrong, without it the query works perfectly, once added to the list of dimension we are getting the error above.

Thanks for your help =)

ghost commented 7 years ago

Hey, I struggled with this last year. userGender will internally be called Dimesion0 or Dimension1 you should be able to get its ID within the analytics dashboard.