How to create Google Analytics 4 Event Tracking

Google Analytics 4 Event tracking allows you to follow up specific users’ activities.

How can Google Analytics 4 Event tracking help your business?

Google Analytics tracks page views. However, users don’t follow a specific route. They click pages, popups, etc. That’s why Google Analytics created the event tracking to let businesses follow-up these interactions. Some of the interactions you can track are the following:

  • – Submit a form
  • – View a popup
  • – Click on a button
  • – Click on a popup
  • – Download a file
  • – Share a page

On the other hand, Google Analytics offers the bellow events’ types:

[Video] Get the latest insights to develop an effective B2B lead generation follow-up

How to set up Google Analytics 4 Event tracking

To create Google Analytics events, you must add a code to the site you want to track. The event code has to follow this order:

  1. Category: The type of category you want to track—for example, videos, PDFs, buttons, pop-ups, among others.
  2. Action: The interaction you want to follow up (download, the name of the button clicked, the played video, etc.).
  3. Label (optional): Additional information of the event, such as the name of the video, file downloaded, among others.
  4. Value (optional): The value assigned to the event.
  5. Fields Objects (optional): Finally, you have to indicate if the non-interaction has taken place. So, a false non-interaction means that it took place, and, by contrast, a true non-interaction didn’t happen.

On below, we attach the GA code that has to be modified as explained above.

ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);

Create custom dimensions and events in the analytics interface

Custom dimensions: After creating the mentioned codes, the next step is making custom dimensions. Go to “Configure”, click on “Custom Definitions”, and click on “Create custom dimensions”. Next, you’ll have to select the scope to “Event” and add a dimension name and description. Finally, you’ll have to choose the event parameter.

Events: Go to “Configure”, click on “Events”, click on “Modify Event”, and select “Create”. Then, introduce the modification name, click on the parameter to choose the condition. After that, click on “Operator” to select one of the different conditional operators.

Under “Modify parameters”, you’ll see that your event is already added. In “New value”, you have to introduce the modification name. In the end, click on “Create”.


Google Analytics 4 Event tracking is a crucial tool to follow-up relevant conversions. This will help you to optimise your campaigns effectively.

Request consultation about how to boost your B2B campaigns on Google!

Request Consultation