Use Google Analytics to count events

Viewed 35

I added GA4 to my website and I try to count a special event. I have a bunch of links on my page and gave them a data attribute data-name. This name is based on the destination of the link.

For example, I have 5 links:

  • data-name="a"
  • data-name="b"
  • data-name="a"
  • data-name="c"
  • data-name="d"

Whenever someone clicks on a link, I get a event in GA that tells me "Someone clicked on a" or whatever the correct data attribute was. So far so good.

Now my problem is, I can only see those events in the past 30 minutes real-time view. But I actually want a table with:

Data Name Count
a 6
b 2
c 5
d 0

Is this possible? I tried to click something together with the exploration tool. But I have no idea if this is even the right tool, or if it is possible with this tool.

Can someone help me by pointing out a way to do this?

Thanks in advance!

1 Answers

You will need to create a custom dimension in your Configuration menu.

When you click create new, just search for the parameter name and then assign it a more user friendly title.

From there you should be able you’d it in reports. It will also show in Data Studio reports as well.

Related