简体   繁体   English

Ruby Google API密钥和分析

[英]Ruby Google API key and analytics

I am creating a Ruby application that needs to access dozens (maybe hundreds) of different Google Analytics accounts, query each account, and then generate a report based on the results. 我正在创建一个Ruby应用程序,该应用程序需要访问数十个(也许数百个)不同的Google Analytics(分析)帐户,查询每个帐户,然后根据结果生成报告。 I know I can achieve this using Googles API client ( http://code.google.com/p/google-api-ruby-client/ ) and Oauth, but that would require manually generating a set of keys and credentials for each analytics account which is not really feasible. 我知道我可以使用Googles API客户端( http://code.google.com/p/google-api-ruby-client/ )和Oauth来实现这一点,但这需要为每个分析手动生成一组密钥和凭证帐户,这实际上是不可行的。 I'm wondering if there is another way to access google analytics (perhaps using the API Keys?) that bypasses the need to generate credentials manually. 我想知道是否还有另一种方式来访问Google Analytics(分析)(也许使用API​​密钥?),从而无需手动生成凭据。

After quite a bit of tinkering, I've finally stumbled upon a solution to my particular problem. 经过一番修补之后,我终于偶然发现了解决我的特殊问题的方法。 As it turns out, I don't need to create a separate Developer account for each Analytics account I want to access. 事实证明,我不需要为要访问的每个Google Analytics(分析)帐户创建单独的开发者帐户。 I can simply create a single Developer account, and then add that Developer accounts' email address to the set of users that are able to access the Analytics account. 我可以简单地创建一个开发者帐户,然后将该开发者帐户的电子邮件地址添加到能够访问Google Analytics(分析)帐户的用户集中。 This will allow me to access multiple Analytics accounts using the same Developer account. 这将允许我使用同一个开发者帐户访问多个Google Analytics(分析)帐户。

Yes, it will still require quite a bit of work adding the Developer email account to hundreds of Google Analytics accounts, but it pales in comparison to creating a separate set of Developer credentials for each Analytics account. 是的,将开发者电子邮件帐户添加到数百个Google Analytics(分析)帐户中仍需要进行大量工作,但与为每个Analytics帐户创建单独的一组开发者凭据相比,它显得微不足道。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM