By - Neal Cole

How to create events in the Google Analytics 4 Interface

4 Configure a new event in GA4 console

A Step-By-Step Guide to Creating Events in Google Analytics 4 Interface:

 

Google Analytics 4, Google’s machine learning powered web analytics platform, is an event-based solution for the modern digital experience. Unlike Universal Analytics, users can create new events in Google Analytics 4 within the new interface. This  enables users to create more targeted goals (now called conversions), and to utilise the powerful Analysis Hub. The hub gives you access to new reports and tools, such as the ad-hoc funnels and pathing, which until recently were only available in GA360.

I’ve previously covered how to upgrade to Google Analytics 4 with Google Tag Manager (GTM). In this post I will concentrate on how to create events in the Google Analytics 4 console.

 

1. Goals and Conversions:

 

To create a conversion (previously called goals) in the Google Analytics 4 console go to ‘All Events’ and enable the relevant event as a conversion. However, because everything in GA4 is an event, including a pageview, this can result in very generic and potentially pointless conversion goals. To prevent this occurring, GA4 allows you to create new events by using the interface.

1. Enable conversions in the GA4 console

 

2. Create events in Google Analytics 4:

 

Given that you don’t want every page view on your website to be classed as a conversion, we need to create events which target individual pages that are important to the business.  For example, our Contact Us page generates leads which can result in new clients for the business. Let’s create an event for users who go to this page.

2. Create an event in Google Analytics 4 interface

 

3. Creating an Individual Pageview Event in GA4:

 

Click ‘Create event’ on the ‘All events’ page (see above)  and click ‘Create’ on the next screen. The URL for the contact us page is https://www.conversion-uplift.co.uk/contact-us/ and so we can use this to define the new event.

3. Create events button in GA4

 

To configure the event, we enter our event name as shown below as ‘Contact_us_visit’ and then the matching conditions. Here we need to set the event_name as equal to page_view. The second condition uses  the ‘page_location’ parameter and that needs to contain ‘contact-us’. We can now select ‘Create’ to save the event in GA4.

 

4 Configure a new event in GA4 console

 

You should now see the new event in the list of custom events.

 

5. Event creation confirmation in GA4 console

4. Test Event Creation:

 

To check your event is working as expected I always recommend using GTM preview mode to validate success. Go to GTM and select ‘Preview’ to enable the debug mode. Once you have opened the preview tab remember to select the GA4 container as it’s easy to forget you now have multiple containers if you also have UA running alongside it.

 

 

Now navigate to the contact-us page and check the GTM Preview mode tab.  You should be able to see the new event in the left-hand navigation and the event displaying as a GA hit event.

6. Test new GA4 event in GTM Preview Mode

 

By clicking onto the tag, you can view all the hit details captured in GTM. Check this is what you are expecting and go back to the GA 4 interface to see if it is also displaying in the console.

7 GA4 Tag in GTM Preview Mode

 

In GA 4, select the ‘DebugView’ at the bottom of the left-hand menu list. It can take a while for new events to display in GA4, but hopefully you should see the Contact_us_visit event in the top events in the last 30 minutes.

8. GA4 DebugView

To create more page view events for individual pages simply repeat the process as explained above. This will enable you  to use these events when configuring a funnel visualisation in the Analysis Hub.

 

5. GA4 Click Events:

 

However, what if not all the events you want to include in your conversion funnel are page view events? Well, this is where GTM comes to the rescue. Many micro-conversions are click events rather than page views. But this is not a problem with GA4 because any type of event can be included in its conversion funnel visualisation.

 

Let’s use GTM to create a click event tag to send data to GA4. Before proceeding you will need to have created your GA4 Configuration tag in GTM to create a click tag in GTM. Check out my post on creating new events in Google Analytics 4 with Google Tag Manager for full details.

 

Continuing with the example of my website, the first field of my contact us form is an email text field. I might want to track how many users click into each field to measure any drop-off at each step in the form completion process.

9. Contact Us form fields

 

Let’s go back to GTM Preview mode and enter an email address in the field on the contact us page. As we can see below the email field has a click ID. This id – ‘wpforms-7058-field_1’  is unique to the email field and so can be used in a GTM trigger for a new tag.

 

10 Click ID in GTM Preview Mode

 

Go to GTM > Triggers > New and name your trigger accordingly. Select ‘Click – All Elements’ as this is an input field and select ‘Some Clicks’. We can now specify the condition as ‘Click ID’ > equals > and enter the exact ID we saw in GTM Preview mode.

11. Trigger for Click ID for Email Address

 

Now go to Tags > New and  ensure the name starts with ‘GA4’ so that you can easily distinguish between your UA tags. Configure the tag as follows:

 

Tag Type: Google Analytics GA4 Event

Configuration Tag: Select your GA4 Config tag

Event Name: email_field

Event Parameters:

If you expand this section, you can send additional parameters to GA to give context to the event. In this instance I want to capture the form_name and GTM already has a built-in variable for this, {{Form Classes}}. You could add other parameters, for example the field name, where you could use the variable {{Click Text}}.  The tag should look like the example below.

12. GA4 Tag for email field on contact us form

 

6. Test GA4 Tag:

 

Once you have saved the tag it’s worth enabling GTM Preview mode again to test that your new tag is working. Remember to select your GA4 container and you can test the tag by clicking into the relevant field. Once you have completed your testing in GTM you will need to publish the new trigger and tag by clicking the ‘Submit’ button.

13. Test new GA4 custom event in GTM Preview Mode

 

Your new events should now appear in the GA4 interface within 24 hours, if not sooner. You can then begin tracking them as conversions, but if you want your new parameters to appear in reports you will first need to register them in the GA4 console.

14. Enable GA4 event as a conversion

 

Select ‘Manage Custom Definitions’ and you will be taken to screen showing existing custom dimensions that have been registered. If it’s not already been registered click on ‘Create custom dimensions’.

15. Create custom dimensions in GA4 interface

In the next screen you just need to enter the name of your new parameter as it appears in your GTM tag. GA4 automatically creates the custom dimension name below and this will define how it appears in GA4 reports.

16. Register GA4 custom definitions

When you save the new parameter, it should now appear in the list of custom definitions as shown below.

17. Parameter names in GA4 interface

The cool thing about creating custom events in Google Analytics 4 is that you can now use them to create a funnel visualisation in the Analysis Hub. This allows you to combine any kind of event (e.g. click, element visibility and page view) to configure a user journey and display it as an open or closed funnel visualisation. This automatically calculates the drop off rate at each stage in the journey.

18. The Analysis Hub in GA4

 

Summary:

 

GA4 automatically tracks page views once you have set up the GA4 Configuration tag in GTM. However, setting page views as a conversion will not distinguish between different pages and so it’s important to create separate events for individual pages in GA4.

 

Creating new events for individual pages can be quickly completed by using the GA4 interface. Set matching conditions by using the page path and include useful parameters in the event. Remember to test the new event in GTM Preview mode to be sure it has been configured correctly. You can also test in the GA4 Debug view, but this can take a while for data to come through.

 

For micro-conversions on a page (i.e. clicks) you can create new events for GA4 in GTM. Use a unique identifier, such as Click ID or Click Text, to create your trigger. This will allow you to configure a GA4 tag in GTM and include parameters if required. Test in GTM Preview mode to validate your tag creation, before publishing your changes in the GTM container. Remember to register your new parameters in the GA4 interface so that they will appear in your reports.

 

Once you have created and tested all the events in a user journey you can use them in GA4’s Analysis Hub. This is where you can configure open and closed funnel visualisations and undertake path analysis with tree graphs. These are great tools that were previously only available to GA360 users.

  • About the author:  Neal  (@northresearch) provides web analytics and CRO consultancy services and has worked in many sectors including financial services, online gaming and retail. He has helped brands such Hastings Direct, Manchester Airport Group Online and Assurant Inc to improve their digital marketing measurement and performance.

 

 

Call Now ButtonCall Me Now!