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

create google analytics 4 compatibility #6815

Merged
merged 5 commits into from
May 24, 2024
Merged

Conversation

orangewolf
Copy link
Member

Fixes

Fixes #5970, #5963, and #5818 and brings GA4 analytics in to the fold. Reports are fixed to render and GA4 tracking now actually records the right information.

Summary

Present tense short summary (50 characters or less)

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • Set up a Google Analytics 4 account for testing. Set GOOGLE_ANALYTICS_ID GOOGLE_ANALYTICS_PROPERTY_ID GOOGLE_ACCOUNT_JSON
  • View some pages
  • See that analytics reports show up and render properly

Changes proposed in this pull request:

  • Add _ga4.html partial for displaying GA4 code
  • Add ga4 support to analytics-events.js
  • Ability to read GA4 analytics API and fill in the existing views

@samvera/hyrax-code-reviewers

@orangewolf orangewolf added the notes-minor Release Notes: Non-breaking features label May 23, 2024
Copy link

github-actions bot commented May 23, 2024

Test Results

    9 files  ±0      9 suites  ±0   16m 49s ⏱️ -6s
4 759 tests  - 4  4 696 ✅  - 4  63 💤 ±0  0 ❌ ±0 
6 491 runs  +2  6 428 ✅ +2  63 💤 ±0  0 ❌ ±0 

Results for commit 6a1d0ac. ± Comparison against base commit 334d9ad.

This pull request removes 97 and adds 93 tests. Note that renamed tests count towards both.
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f57131b3c00>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f5711f9af00>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 652b5f09-70c2-4990-83df-d13b0451f80e
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 097d6521-2650-45ae-8889-efb97d81bc28
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 39274684-155c-41f8-97b4-0be7449b9f35
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create #<Hyrax::PermissionTemplate:0x00007f5711805a10>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f57116ea3d8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to destroy Hyrax::AdministrativeSet: e93ab036-5a75-4c50-99b5-fd05911d8f0b
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to edit Hyrax::AdministrativeSet: 7fff2a91-da0f-465d-8367-99c6c8d09b9c
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to update Hyrax::AdministrativeSet: 0c97dd15-7af3-457c-9f46-9b4b480dc13b
…
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f0fb67f0f18>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f0fb7534120>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 82dbc593-9b9f-456d-9500-2c0b66fef201
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 4b501c07-9f47-456a-b48c-e32c93e5abe3
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 089d5eb3-ead1-47a0-9a3a-0cf24f19f1bc
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create #<Hyrax::PermissionTemplate:0x00007f0fbeb4ed88>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f0fc00c9118>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to destroy Hyrax::AdministrativeSet: 2134fb55-a8e5-43fe-9a57-1dd3f375682a
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to edit Hyrax::AdministrativeSet: 2b1041ae-e415-4cc5-a3b3-ebdc9ef6b762
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to update Hyrax::AdministrativeSet: a919f959-8ab5-4a76-9c8b-97718611d0fd
…

♻️ This comment has been updated with latest results.

@@ -154,6 +154,11 @@ def total_visitors(period = 'month', date = 'today')
response["nb_visits_returning"].to_i + response["nb_visits_new"].to_i
end

# TODO implement
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't fix Matomo for this release, but I honestly think that this may be the only part that needs to be updated for Matomo 4 to work again. There is another task for adding Matomo 5

@dlpierce dlpierce merged commit 4d2c654 into main May 24, 2024
12 checks passed
@dlpierce dlpierce deleted the ga_4_fast_and_furious branch May 24, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-minor Release Notes: Non-breaking features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google Analytics 4 Support
2 participants