Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way for Google Analytics to track multiple event parameters like Mixpanel?

Given:

_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

I tried with opt_label but it seems like it's just a string and doesn't accept a hash of different parameters like Mixpanel do.

I suspect one of the the work around is using custom variables? But the docs seems confusing. Appreciate any advice.

like image 354
John Lee Avatar asked Jun 22 '12 22:06

John Lee


People also ask

Can mixpanel replace Google Analytics?

Google Analytics is able to pull in all of its data from Google Ads, offering a seamless and comprehensive integration. Mixpanel simply can't compete with that. If you're more interested in measuring where people are coming from, rather than what they do, then Google Analytics is a better tool.

Why mixpanel is better than Google Analytics?

Mixpanel provides data that's more tailored to your conversion and engagement goals than GA can, as long as you're willing to put in the time to set up custom event tracking. However, in terms of acquisition metrics, GA can be sufficient.

How many custom events Google Analytics?

Hence you will see a more diverse list of collected values in your GA4 reports. If you want to send more parameters, you are free to include up to 25 custom parameters with a single event.


1 Answers

While you can certainly make this work in Google Analytics, other analytics services like Mixpanel, KISSmetrics, Kontagent, etc specialize in event analysis and give you more flexibility. Having said that, you can hack the Google Analytics event model to get what you’re looking for.

If you want to track multiple parameters for each event in Google Analytics I’d suggest cramming the parameters you want to track into the event label. This is workable for two reasons: Event labels can be really long (ridiculously long, actually) and Google Analytics provides flexible filtering and segmentation options.

So, to extend an example discussed in an earlier answer, you could have an event for tracking video play details that looks like this:

_gaq.push(['_trackEvent', 'Videos', 'Play', 'title:MoreCatLolz, 
    percentPlayed:63, adShown:true, res:480p, fullScreen:false']);

All we've done is toss a few arbitrary parameters into the event label string in such a way that we can pull them out later. To analyze the results you could filter your event reports to show, say, the number of times the ‘MoreCatLolz’ video was shown with ads:

Number of times MoreCatLolz was shown with ads

Alternately, using advanced segments and regex, you could count the number of visits in which users watched at least 90% of any video:

Number of visits in which users watched at least 90% of any video

To track persistent user data, such as name, join date, level, purchase count, etc., I’d suggest using visitor-level custom variables which are automatically included with every tracking call (including events) and allow you to apply many of the same analysis techniques.

like image 190
Jono Avatar answered Sep 22 '22 09:09

Jono