widop / google-analytics

Google certificate-based authentication in server-to-server interactions with google analytics for PHP 5.3+
MIT License
27 stars 20 forks source link

client_id is in fact Client Mail #13

Open drazik opened 9 years ago

drazik commented 9 years ago

Hello,

I installed this repo yesterday (using the Symfony2 bundle) and I don't know if Google changed something or what but what you call "client_id" (XXXXXXXXXXXX@developer.gserviceaccount.com) is actually called "Client Mail" by Google. Client ID is nearly the same but not really.

tmartin commented 9 years ago

Hi,

I think it's the same concept. The name of this field has usually been misleading in the past. I'll check to see if everything is all right.

Although, is the code working properly?

drazik commented 9 years ago

Google analytics give a client id and a client mail. What they call client mail is what you call client id. Their client id is something else (I didn't need it to use the bundle, but when I tried to put it in client_id, it didn't work).

The code is working as expected, thanks for the good work :)

egeloen commented 9 years ago

Yeah, we are aware of this but the problem is google analytics uses client_id property for the client_mail. This is definitively not intuitive at all but this is how it works... Changing it to client_mail would confuse even more IMO.

drazik commented 9 years ago

Yep I think you're right. But since you explain that "client id" is something like XXX@developer.gserviceaccount.com it is a littlle more intuitive. If you are aware of that, it's not a problem anymore ;)

egeloen commented 9 years ago

Maybe we should just refine the doc? What do you think @tmartin?

nivv commented 9 years ago

:+1: