Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade _setCustomVar to Universal Analytics

I have look at the Universal Analytics without finding the correct answer to my problem.

How do I update this line from the old Analytics to the new Universal Analytics?

_gaq.push(["_setCustomVar", 1, "splittest", "control", 1]);
like image 921
user3778578 Avatar asked Jan 10 '23 08:01

user3778578


1 Answers

Custom variables have been replaced by custom dimensions in analytics.js and Universal Analytics:

ga('set', 'dimension1', 'control');

You can read more about replacing custom variables with custom dimension here

like image 143
rokh Avatar answered Apr 01 '23 12:04

rokh