Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Add analytics configurations #403

Open
elrayle opened this issue Dec 7, 2021 · 0 comments
Open

Add analytics configurations #403

elrayle opened this issue Dec 7, 2021 · 0 comments

Comments

@elrayle
Copy link
Contributor

elrayle commented Dec 7, 2021

Descriptive summary

This describes how to setup the new Hyrax analytics configuration. Analytics are temporarily turned off in this PR to avoid exceptions being thrown.

How analytics are turned off

Analytics is temporarily turned off by setting config.analytics = false in /config/initializers/hyrax.rb.

Before turning on

The following ENV variables need to be setup for use in /config/analytics.yml:

analytics:
  google:
    analytics_id: <%= ENV['GOOGLE_ANALYTICS_ID'] %>
    app_name: <%= ENV['GOOGLE_OAUTH_APP_NAME'] %>
    app_version: <%= ENV['GOOGLE_OAUTH_APP_VERSION'] %>
    privkey_path: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_PATH'] %>
    privkey_secret: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_SECRET'] %>
    client_email: <%= ENV['GOOGLE_OAUTH_CLIENT_EMAIL'] %>

To turn on

Remove config.analytics and config.google_analytics_id from /config/initializers/hyrax.rb to avoid conflict with new configuration.

Set ENV['HYRAX_ANALYTICS'] = true to turn analytics back on.

Related work

PR #402 update to latest hyrax (includes save default admin set id & new analytics)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant