Skip to content

Remove Matomo and adjust libchat injections into remote app boostrapping#27

Open
adamshire123 wants to merge 4 commits intomit-mainfrom
remove-matomo
Open

Remove Matomo and adjust libchat injections into remote app boostrapping#27
adamshire123 wants to merge 4 commits intomit-mainfrom
remove-matomo

Conversation

@adamshire123
Copy link

@adamshire123 adamshire123 commented Feb 6, 2026

Why these changes are being introduced

  • Matomo tracking code was causing Firefox to freeze and display a warning about the page slowing Firefox down, so we are removing it completely until we are able to find a solution which allows for its use.

    • How we already tried to resolve the issue:
      • Adding the tracking code during bootstrapping
      • Adding the tracking code in custom.js
      • Disabling the "Enhanced Tracking Protection" in Firefox
    • Primo NDE uses mixpanel for tracking UI interactions which should cover the majority of
      what we would have used Matomo for.
  • We also want to avoid conflicts with libchat widget script injection and the remote app bootstrapping

How this addresses that need

  • Removes Matomo tracking code injection
  • Moves the libchat injection point after the remote app is bootstrapped

Side effects of this change

None

How can reviewer(s) test

new code is live here https://mit-psb.primo.exlibrisgroup.com/nde/fulldisplay?query=compendex&tab=all&search_scope=all&searchInFulltext=false&vid=01MIT_INST:NDE&lang=en&docid=alma990008888900106761&adaptor=Local%20Search%20Engine&context=L&isFrbr=false&isHighlightedRecord=false&state=

  • doesn't freeze in firefox
  • libchat widget works

Relevant ticket(s)

https://mitlibraries.atlassian.net/browse/NDE-3
https://mitlibraries.atlassian.net/browse/NDE-4

@djanelle-mit
Copy link

@JPrevost @jazairi @matt-bernhardt Tagging you three for review on this one. It's a little past my JS / performance knowledge to give effective code review.

@JPrevost JPrevost self-assigned this Feb 12, 2026
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

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

This feels important to discuss removing our centralized web tracking tool.

I appreciate the details on what the problem was and what was tried to resolve it. However, this feels like a discussion that includes DEP Leads so we can understand the ramifications of this change should occur before we proceed with this change.

As the LibChat code is not related to the concern about Matomo being removed without discussion, I'd suggest moving that into a separate pull request so it can proceed.

@adamshire123
Copy link
Author

@JPrevost If we keep the matomo tracking code in place, then NDE doesn't work. So I'm not sure waiting to remove it until we have the discussion you propose is practical.

@JPrevost
Copy link
Member

@adamshire123 Do what you want, but removing centralized analytics tooling from NDE was a concern I brought to my boss who confirmed it felt like something to be understood and not just done.

@amecynth
Copy link

Because NDE is not a live production system yet, I recommend that it is safe to remove Matomo while we do further internal development on NDE. However, I agree with Jeremy that this is a significant change and we need to have a conversation with the DEP leads on this before NDE goes live. @JPrevost do you want to coordinate that conversation or do you want me to?

@JPrevost
Copy link
Member

@amecynth I'd prefer you/the NDE project team coordinate the discussion about this.

In the short term, if someone creates a ticket in NDE to have that conversation and add Matomo back (while resolving the problems that currently exist when it is in place) if the discussion warrants, I will remove my block on this code landing.

@adamshire123
Copy link
Author

Thought about it some more... I'm fine with waiting for a meeting before we merge these changes. In the meantime I will upload a customization package with these changes to NDE so we can continue working with it.

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.

4 participants