-
Notifications
You must be signed in to change notification settings - Fork 104
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
Why not use Google's autrotrack lib in place of your Analytics modules? #307
Comments
Hey @elisechant Thanks for sharing this, it does look like there's an opportunity here to reduce effort on our end. My initial thought is the browser support seems low (https://github.com/googleanalytics/autotrack#browser-support) for us. I'm going to chat with the frontend community at GDS and see if we can take advantage of this. Will update you with any more details. 👍 |
Hi @elisechant I've done a bit of research that (I hope) helps answer your question. HistoryOur The original Our requirements for the new library were:
We wanted a single library rather than raw GA code so developers could take what they learnt about using it on one project onto others. We also wanted it to be easier for teams to swap GA out for another solution if needed by hiding the internals. Centralised control was an important part of this because it lets us push features/fixes out to all teams and creates a single place for any discussions on how we track things. OutcomesIn taking this approach we’ve also found that committing to a single library we own means we get a nice process for controlling the analytics code that ends up in our projects. The code is on github so anyone can suggest a feature/fix but they need to write a pull request explaining the need which can then get checked by the community. For example: #208 This has meant all new features end up being properly discussed and documented. Comparisons to autotrackOf all the plugins built for GOVUK.analytics, only external link tracking is included in the Autotrack library. If/when we have need for more of the plugins contained in Autotrack it should be easy enough to make all those available through the existing We'd be keen to keep the |
Wow @tombye! thanks for such a comprehensive response! Totally understand and agree with yours and @NickColley's points - makes sense. I do like the brevity of autotrack's interface though. It's possible I suppose that Google actually are leveraging your codes - some very similar naming conventions and behaviourals. Now that would be cool! Thanks again, can close. |
Thanks for raising @elisechant 👍 :) |
Just taking a look at your Analytics modules, seeing a lot of direct similarity between what you guys have built and GA's Autotrack plugins:
Alphagov:
https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/analytics.md
Google:
https://github.com/googleanalytics/autotrack
Wondering if you already had considered this and/or what your reasons may have been for rolling your own instead of using the official lib?
The text was updated successfully, but these errors were encountered: