sul-dlss / exhibits

Stanford University Libraries online exhibits showcase
https://exhibits.stanford.edu
Other
20 stars 7 forks source link

Configure Exhibits to show GA4 analytics dashboard #2304

Closed corylown closed 1 month ago

corylown commented 1 year ago

Spotlight 4.1.0 added support for displaying GA4 analytics in Spotlight apps: https://github.com/projectblacklight/spotlight/releases/tag/v4.1.0

We need to configure this to connect to our GA4 Exhibits property via Google Cloud.

https://console.cloud.google.com

https://github.com/projectblacklight/spotlight/blob/main/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb#L66-L84

corylown commented 1 year ago

It looks like we're going to need to use Google Cloud to authorize access to GA4 properties via the Google Analytics API. We may need to work with Ops to set up a service account with Cardinal Cloud.

We should have access now through https://console.cloud.google.com/

corylown commented 1 month ago

@dnoneill I tried this out on stage this morning and it looks great. Let's get this set up for prod with one minor tweak -- I think a better name for the vault key for the json key file would be ga_json_key_file instead of ga_json_key_path.

dnoneill commented 1 month ago

Closed with a number of PRs across multiple repositories. Below are just prod, but there were also PRs for stage.

https://github.com/sul-dlss/exhibits/pull/2580 https://github.com/sul-dlss/shared_configs/pull/2247 https://github.com/sul-dlss/puppet/pull/11336

Plus adding the json file to vault with put command.