Add documentation about the Token for accessing google analytics
17855
Reporter: trobertson
Assignee: omeyn
Type: Task
Summary: Add documentation about the Token for accessing google analytics
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2015-09-30 10:52:00.195
Updated: 2015-09-30 15:51:26.652
Resolved: 2015-09-30 15:51:18.937
Description: The R scripts make use of an undocumented token:
https://github.com/gbif/analytics/blob/master/R/country-reports/pg2_traffic_table1_top5_cities.R#L8
Please can you add documentation about how to configure this? Is it in the GBIF configuration project?
]]>
Author: bko@gbif.org
Comment: Actually a question that may or may not be relevant to this documentation. I am enabling Drupal to talk to Google Analytics API in order to better integrate site usage information and generate a pre-configured usage report (provided by modules). I am ask to register an account at Google Developers Console and use the API key generated there. Is the API key what we talk about as "token" in this issue?
Created: 2015-09-30 10:57:14.881
Updated: 2015-09-30 10:57:14.881
Author: jlegind@gbif.org
Created: 2015-09-30 11:35:52.881
Updated: 2015-09-30 11:35:52.881
You have to use OAuth 2.0 to generate the token, not the API key.
There is a guide how to do it here:
https://cran.r-project.org/web/packages/RGA/vignettes/authorize.html
Author: bko@gbif.org
Comment: I guess then the "token" here means "OAuth 2.0 client IDs" in the Google Developer Console.
Created: 2015-09-30 11:39:56.874
Updated: 2015-09-30 11:39:56.874
Author: omeyn@gbif.org
Comment: I've added documentation to the R/country-reports readme that explains how to generate your own token. I feel like this is the kind of thing we should each generate (once) when needed, rather than passing around a token generated from one account. https://github.com/gbif/analytics/blob/master/R/country-reports/README.md
Created: 2015-09-30 15:20:10.957
Updated: 2015-09-30 15:20:10.957