Mobile app version of vmapp.org
Login or Join
Vandalay111

: Google Analytics: Count how many times specific event is fired per session Long question short How to measure in how many sessions the event in category x with label y is fired more than

@Vandalay111

Posted in: #AdvancedSegments #GoogleAnalytics

Long question short

How to measure in how many sessions the event in category x with label y is fired more than once?

Long question long

When the user clicks on a specific link on my website, I first show him a popup to ask him to confirm his action (in reality the situation is slightly more complex, but for the sake of a short question I won't elaborate on this now). There is also another button that closes the popup and does not confirm his action.

I want to measure how many users click a "close" button more than once per session, because this is the discouraged action and I would like to know if there's something I should do to discourage people from clicking that button (which is only if there are many users that click it more than once per session).

I have found that I can make a segment that includes the "closes popup" event (category "popup" label "close"), but this does not include the number of times it happens per session. I can also count the number of total events, or even number of total unique events per session, but that still doesn't give me the insight I need.

Is there anyone that could help me set this up?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

1 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

If you are using the javascript confirm method, you can include ajax code there to save the number of times a user is hitting no (and yes if you'd like). If you are using a custom JS popup, you can write it a similar way

var r = confirm("Are you sure you want to leave?");
if (r == true) {
//whatever you want to do
} else if (r == false) {
// ajax post to store a "no"
}




EDIT WITH GA

You can track the button click in GA with a data push, or if you have GTM you can set it up as an event on the GTM side. With GA, you can take the above code and do a similar thing:

var r = confirm("Are you sure you want to leave?");
if (r == true) {
//whatever you want to do
} else if (r == false) {
// report to GA as a "cancelled" click
dataLayer.push({'event' : 'eventClickTrigger', 'eventCategory' : 'Page Leave', 'eventAction' : 'Cancelled', 'eventLabel' : 'Page Leave'});
}


If you have GTM, it may be easier just to track the cancelled button if it has a class or some other identifier.

There is a good walk through here so I wont copy and paste all their stuff: mediacause.org/track-button-clicks-google-tag-manager/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme