Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Change analytics to use GA4 features #319

Description

@BrunoRosendo

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions