Analytics
5.7K members online now
Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

GAPI: where to get profile and report id

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

currently I am trying to implement google analytics with php and I found a nice lib called GAPI: https://github.com/erebusnz/gapi-google-analytics-php-interface

 

I mananged to set up a service account and retrieved the security key. But where do I get the profile ID and the report ID?

 

define('ga_profile_id','37379846');

$ga = new gapi("dummyaccount@dummyservice.iam.gserviceaccount.com", "file-1fd9e1fc9a02.p12");

$ga->requestReportData(37379846);

 

I keep getting this result: Invalid value 'ga:'. Values must match the following regular expression: 'ga:.+'"

Re: GAPI: where to get profile and report id

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭
Hi,

Got to GA > Admin > click on Account / Property / View Settings.

Best Regards,
GA Guru.

'Star' or 'Accept as Solution' if it helped.