How can I define custom names for custom variables in Google Analytics?

Gold Contributor
Gold Contributor
When mapping custom variables in Google Analytics tag, we can only choose source and destination (product.id to cvar4.3). How can I set the name for this custom variable? Now, the name set is the same as the UDO name. _gaq.push(['_setCustomVar', 1, // This custom var is set to slot #1. Required parameter. 'Items Removed', // The name acts as a kind of category for the user activity. Required parameter. 'Yes', // This value of the custom variable. Required parameter. 2 // Sets the scope to session-level. Optional parameter. ]);
3 REPLIES 3

How can I define custom names for custom variables in Google Analytics?

Employee Emeritus
Lluis, Currently there is not a way to override the Custom Variable Names. The Custom Variable naming defaults to the name of the UDO variable as you point out in your question. You could create a new UDO variable with a more friendly name and use a Set Data Values extension to set the new UDO friendly variable equal to the current variable. Then map the new UDO friendly variable to the GA tag for the Custom Variable. This will still use the name of the UDO variable, but you can change the name of the variable to be whatever you'd like.

How can I define custom names for custom variables in Google Analytics?

Gold Contributor
Gold Contributor
Hello Jared, Thanks for your answer. I will setup duplicated UDO variables in order to override the defaults. Since we are migrating our tag management solution, we need to be consisten with our naming. Thanks again!

How can I define custom names for custom variables in Google Analytics?

Employee Emeritus
Hi Lluís, you could also try upgrading to Google Universal Analytics. The variable names are configured server side instead, so it won't matter what name the UDO has.
Public