Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate the GA with API keys #2477

Merged
merged 1 commit into from
May 5, 2023
Merged

Integrate the GA with API keys #2477

merged 1 commit into from
May 5, 2023

Conversation

lamtu1
Copy link
Contributor

@lamtu1 lamtu1 commented May 4, 2023

Add in the Google Analytics key to the YML file to see if this fix the Scholars Archive analytics.
#2442

@wickr
Copy link
Member

wickr commented May 4, 2023

Have you looked at the existing keys here? https://github.com/osulp/Scholars-Archive/blob/main/config/initializers/hyrax.rb#L68

A Pull Request last year tried to remove the analytics.yml file here, since it wasn't being used and was confusing, but the file was expected to be there by another file. #2370

@lamtu1
Copy link
Contributor Author

lamtu1 commented May 4, 2023

@wickr I have gotten a chance to look at it, and Corey and I also sit down and talk about it. We look through hyrax.rb and thought it is connecting to GA via in hyrax.rb to send data on to GA from Scholars Archive. Because what we discover that GA doesn't automatically send data back to Scholars Archive to update it on SA end, we thought adding this back in might fix it. But I can run through with it with Corey once more on this situation.

@wickr
Copy link
Member

wickr commented May 4, 2023

Ok, I see what you're saying. But if this file was never actually used, but the system of retrieving analytics data worked up until a bit ago, I would think it's something else.

@lamtu1
Copy link
Contributor Author

lamtu1 commented May 4, 2023

I will take a look and see where it will go from there but thanks for letting me know about it Ryan.

@CGillen
Copy link
Contributor

CGillen commented May 4, 2023

I'm not convinced it was working until a little bit ago. @carakey @simholt any idea how long analytics have been out of sync?

As far as I can tell, the stats were synced from dspace ~6 years ago, then stopped updating around Jan 2022 for some reason.

From what I can trace, Hyrax attempts to pull analytics from GA, failing that they use ::FileDownloadStat which I can't find where they're generated besides our process_legacy_stats rake task that did the dspace syncing. Comments to the analytics code claim Hyrax::Download objects are pushed to GA as events, I'm assuming for consumption later to build these analytics pages

@wickr
Copy link
Member

wickr commented May 4, 2023

I'm guessing we lost another config or an API key (.p12 file) somewhere along the way, or something got messed up with the database on our end.

Or, there was a Rake task running for stats, but it didn't get included in one of the system migrations. There might be helpful info here: uclibs/scholar_uc_legacy#1767

@simholt
Copy link
Contributor

simholt commented May 4, 2023

@CGillen No idea, they have been problematic off and on since the move to Hyrax.

@carakey
Copy link

carakey commented May 4, 2023

@CGillen All I can say for sure is that it was reported as busted by an OSU faculty on March 13.

@CGillen CGillen merged commit b146d07 into main May 5, 2023
@CGillen CGillen deleted the feature/analytic-fix branch May 5, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants