You are currently viewing How to track navigation menu click with Google Tag Manager in 2024

How to track navigation menu click with Google Tag Manager in 2024

In 2024, understanding how users interact with your website or tracking the data of your website visitors is a must. In this digital space if you can’t track how your website visitors are interacting then you are lagging far behind to success. For this type of tracking google tag manager is the most essential tools in 2024. We will know about navigational menu click gtm

navigational menu click gtm

Your top navigation  menus provide a roadmap for your website visitors to their final destination. If you have 4 to 5 top menus then you should want to track which menu is getting the maximum number of clicks. Thankfully you can track those insights with some simple clicks through google tag manager.

Step 1: Create a trigger for top navigation links

1a. Log in to your google tag manager account, click the Tigger section

1b. Click New from the upper right of your trigger section

1c. Click on new and give a proper name so that you can remember the trigger type in future, for instance as we are tracking navigation menu so we named it as nav menu tracking

1d. Choose the trigger type “Just Links”

1e. From trigger configuration select Some link clicks option

1f. Select the conditions as “ Click Text” as we will track the click text of navigation menu, here we have selected matched regex ( ignore case ) for our 2 nav menu that is Home and blog, and here you can see we have separated them with pipe button Home| Blog

Now you have set up the trigger next you have to set up the tag and sent data to google analytics 4.

Step 2: Create a GA4 Event Tag

We assume that you know what tags and triggers are.

2a. Go to your tag section and create a new tag 

2b. From tag configuration segment select google analytics as tag and select google analytics : GA4 event

2c. Enter your ga4 measurement id, generally you will find the measurement id in your GA4 property.

2d. Find measurement id from data stream in ga4

2e. Ga4 naming convention doesn’t support capital letters or any space so we will name the event as underscore that is:    click_text

Step 3: Select The Trigger

3a. Click triggering 

navigation menu click via gtm

3b. Now chose the trigger as menu tracking 

navigation menu click via gtm

3c. Now save the trigger

navigation menu click via gtm

Step 4: Test with preview & Publish your Tag

4a. Before publish your tag you need to check whether it has been set up properly or not, go to gtm overview and click on Preview

navigation menu click via gtm

4b. Put your website url in the box and click connect

navigation menu click via gtm

4c. After connecting it will open in a new window and it will show tag assistant is connected ( if you have installed the tag assistant chrome extension )

navigation menu click via gtm

4e. Click on any of the top nav menu and head back to your tag assistant tab and check if the menu tracking tag is fired or not

navigation menu click via gtm

As we can see our menu tracking tags are fired properly here

4f. Go back to your gtm workspace and click submit ( next to preview ) and name it as your tag reference and publish the new version.

navigation menu click via gtm

Congratulations! You have successfully set up the tag and trigger to track your nav menu click with Google tag manager and from now on you can check the data in google analytics 4 dashboard in the engagement section or in real time preview.

If you want to know more about google tag manager read here.