How to use the v3 API in case of a wordpress plugin

68 views
Skip to first unread message

Risp

unread,
Jun 1, 2012, 4:11:32 AM6/1/12
to google-analytics...@googlegroups.com
Hi, I want to create a wordpress plugin that shows some basic information from Google Analytics. Having read through the documentation of the v3 API it's not clear to me how I should register this plugin.

Should I create a client ID for this plugin? If so it seems I have to know the redirect URL in advance, which I don't know in this case since each users is going to use it from his own domain. Also it seems that all API call will go through this account.

Or does it require for each user that wants to use this plugin to register it as an application? Making it a lot harder for users to get it running?

Nick

unread,
Jun 1, 2012, 1:29:33 PM6/1/12
to google-analytics...@googlegroups.com
Since your users will be installing this plugin, we recommend you use OAuth2 for installed apps: https://developers.google.com/accounts/docs/OAuth2InstalledApp

That way you can use one set of IDs for everybody who uses your plugin, monitor usage, etc...
Also your users will not have to touch the apis console.

-Nick

tibor

unread,
Jun 1, 2012, 8:58:29 PM6/1/12
to google-analytics...@googlegroups.com
Does that mean we have to share our personal quota with the thousands of potential users/businesses of such a plug in? Does the v3 API discourage developers releasing free Google Analytics plugins for open systems like CMS?

I noticed that allowing other users to use their own keys to access the API for the same application was discouraged ("All these installations must share and use a single Project ID to access the API"). I'm having trouble understanding the ramifications of the new rules for distributed web applications.

In the case of a freely available CMS plugin, is it allowed to let individual admins register their own keys or must it be done globally by the plugin author / CMS author?
Reply all
Reply to author
Forward
0 new messages