Creating a generic metrics framework would be a good idea so people can track these sort of data points in a provider of their choice (google analytics, mixpanel, etc.).
An easier approach would be to use something like segment.io which already does this: https://segment.io/docs/integrations/google-analytics/
This would be a pretty deep integration point and would be difficult as a plugin I would imagine i.e. it would have to be baked into the core