If you run your own analytics platform, you are in control of everything, there is no 3rd party in between. If you play fair, you can be GDPR compliant while getting some user data.
With google … you never know.
I stopped using them and moved on to ownership.
I went for this: https://matomo.org/ and I thing I will never go back to google for analytics.
I agree that it is wise to move to more privacy compliant solutions. We did the same. Though @filipenevola’s package is nicely put together and can be adapted to use Matomo’s scripts instead. We built a similar one internally, not knowing this exists
We ended up setting up our own analytics framework.
For route changes, we hook into any changes in the “history”. We use the history package for this, create a browser history (which is also used for Redux) and then listen to changes. On every change, we trigger events in Google Analytics and Facebook, but this could be easily extended to other services like Matomo.
Plus, we offer all components access to tracking functions that can be called from anywhere to track custom events.
This gives us all the flexibility we need, without fiddling around with any 3rd party packages.
In general, the more experienced I got with Meteor, the more I tried to avoid 3rd party packages wherever possible. If they get abandonded (which was quite common in the Meteor ecosystem over the past years), you get stuck in limbo or you have to fork them anyways.