Google Analytics 4 also provides the option to modify and create events in the analytics console only. Note that you can create or modify events based on the occurrence of other events and parameters.
Modify event:
You can modify existing events. For example, if you are collecting two different events (Event Name: Button Click 1 and Button Click 2) you can modify these events under one name as simple ‘Button Click’. You can also fix typos in event or parameter names, and you can modify event names and parameters as well.
To start event modification, follow the below steps.
Step 1: Go to your Analytics 4 property and click on ‘All Events’.
Step 2: Click on ‘Modify event’.
Step 3: An overlay will appear like the one below. Click on ‘Create’.
Step 4: Enter the modification name (new event name).
Step 5: Now click on ‘Add condition’.
Step 6: Click on the parameter to define your condition. It will pop up a drop-down list with available parameters that can be modified.
Step 7: Since we are doing event name modification, I will choose the event_name parameter. Now click on ‘Operator’ where you will get another drop-down menu with different conditional operators.
In our case, we will use equals. Select ‘equals’ and in the value input box enter the first event value to modify (Button Click 1).
Step 8: Now repeat the procedure for adding the second condition. Click on ‘Add Condition’, then select ‘event_name’ as parameter, select operator as ‘equals’ and event value as ‘Button Click 2’.
Now click on ‘Create’.
Congratulations!! You have successfully modified your events. You can go to the ‘All Events’ tab and check. Now instead of Button Click 1 and Button click 2 events, there is just one ‘Button Click’ event.
Create Event:
Just like modifying an existing event, you can also create a new event from the existing events.
Let’s look at an example, suppose you already have a button click event on your home page banner and another button click event on your product category page with a promotional banner. If you want to fire a third event as ‘Promotion click’ when somebody clicks the banner button on the product page, you can use the create event function in GA4 and, based on a parameter condition, you can specify when to fire.
In this example, we are already tracking the button click event on the product page. So, we can use this condition in our parameter settings to create a new event as ‘Promotion click’
The condition will be as below:
Event: Button Click
AND
Parameter: page_title = product_page
Follow the below steps to create a new event with these conditions.
Step 1: Go to your Analytics 4 property and click on ‘All Events’.
Step 2: Click on ‘Create event’.
Step 3: An overlay will appear like below. Click on ‘Create’.
Step 4: The next steps are similar to the steps we performed while modifying the events. So, we will use the following configuration settings:
- Custom Event Name: Promotion_Click
- Matching Condition (Click on Add Condition)
- Parameter 1: event_name equals ‘Button Click’
- Parameter 2: page_title equals ‘Product_page’
Step 5: Click on ‘Create’.
Congratulations!! You have successfully created a new event. You can go to the ‘All Events’ tab and check the ‘Promotion Click’ event is appearing.
So, that is how you set up event tracking in Google Analytics 4.