This could be an international matter so I prefer to post in english.
If ever you have this error using Google Analytics API : GDatainsufficientPermissionsUser does not have sufficient permissions for this profile.
It might be because you are using wrong profile ID.
Most of GA users do think the profile ID is like UA-3136460-1 or just the ID in the middle : 3136460
It’s not.
To find your profile ID, just go to your admin section of Google Analytics, click on the website you want, then click on the content (sub-site) and then on « profil parameters » ; here will be your profile ID.
With GAPI PHP class, you can use this method too:
| PHP | | Copier le code | | ? |
| 01 | |
| 02 | |
| 03 | $gaResult = $ga->requestAccountData(); |
| 04 | echo '<pre>'; |
| 05 | foreach($gaResult as $result) |
| 06 | { |
| 07 | printf("%-30s %15d\n", $result, $result->getProfileId()); |
| 08 | } |
| 09 | |
| 10 |