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

Change analytics to use GA4 features #319

Open
BrunoRosendo opened this issue May 21, 2023 · 0 comments
Open

Change analytics to use GA4 features #319

BrunoRosendo opened this issue May 21, 2023 · 0 comments

Comments

@BrunoRosendo
Copy link
Member

In #318 we successfully ported NIJobs from GA3 to GA4. This ensured that our analytics correctly worked with the new system, since GA3 was deprecated on the 1st of July 2023.

GA4 has a completely new interface and data flow but Google made the transition easier by automatically translating old mechanisms to the new ones. GA4 is imo simpler than GA3, everything is based on events and event parameters.

This means we can still use the old API (e.g. dimensions and old event system) and they'll all be converted into events and event parameters. However, this also means our code isn't very clear when compared to the new dashboard.

Additionally, we could be making better use of the new flexible events. Previously, our events were limited to a few parameters like action, category, and label, and the rest was handled by custom dimensions which imo were never that great, we were using them because of the platform's limitations. This completely changes in GA4, everything is controlled by event parameters and we have full control over them!

If you check the events in our dashboard, you'll see parameters like event_label which is simply a translation from the old system. We should rethink how we organize our analytics and truly do it however we want.

A good example of how this can be improved is the search analytics. We currently have a simple success event when a search happens (with the path as the label) and the rest was set separately in dimensions. We can now use the same event and pass as many parameters as we want, with all the search fields! The same goes for other events and dimensions we currently have. Take a look at src/utils/analytics/constants.js for an overall view of all dimensions and actions.

Finally, I'll leave you with a few links that helped me understand this transition:
https://support.google.com/analytics/answer/9973999?hl=en&utm_id=ad
https://www.youtube.com/watch?v=Y6WxUEk6clw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant