Adswerve

Google Analytics Tutorial: Why Your Custom Variables Aren’t Showing Up Anymore


December 18, 2014

Ever wonder why your custom variables aren’t working anymore? The easy answer is Universal Analytics happened. Now what? 

Replace Custom Variable with Custom Dimensions

When Google released Universal Analytics, Custom Dimensions replaced Custom Variables. Custom Dimensions are similar but are setup slightly different. The good thing is it provides more flexibility (Google also added Custom Metrics, but that is for another day). All you need to do is to replace your Custom Variables with new Custom Dimensions.

First, you’ll want to start by documenting all current custom variable names and scopes you’re using.

Next, go into your Google Analytics Account to begin configuring your Custom Dimensions. Now you don’t set up the Custom Dimension index, name, and scope directly in the code snippet. This is now done directly in the Google Analytics account and configured at a property level.

To begin, go to the Admin tab. Select the property you want to add the Custom Dimension to. Under the property click on Custom Definitions and then Custom Dimension.

 

Blog_Post_-_Custom_Dimensions_-_Google_Docs (1)

 

 

 

 

 

 

 

 

 

 

 

This will bring up the list of all current Custom Dimensions you’ve added to that property. Since this is your first one, the list will be blank. Click the red button that says +New Custom Dimension to add your first Custom Dimension.

 

Blog_Post_-_Custom_Dimensions_-_Google_Docs 2

 

 

 

 

 

 

Here you will be prompted to enter the Custom Dimension name and select the scope from the drop down. You will see an Active checkbox, this is for when you want to disable a Custom Dimension or Metric so leave it checked for now.

Blog_Post_-_Custom_Dimensions_-_Google_Docs 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click Save and you’ll see information about adding the Custom Dimensions code snippet. You can ignore it for the moment. Click Done and then you’ll see your Custom Dimension listed with an index of ‘1’.

Blog_Post_-_Custom_Dimensions_-_Google_Docs 4

 

 

 

 

 

 

 

Configure Your Custom Dimensions

Indexes Are Now Assigned Upon the Custom Dimension Configuration. You’ll want to have this listview up when adding the Custom Dimension snippets or write them down. This way you can make sure each Custom Dimension code snippet corresponds to the right index in your GA account.

Continue this process till all your previous Custom Variables have a matching Custom Dimension added to the property. If you need to make any edits to a Custom Dimensions just click on its name to see its details and make your changes.

Once you configure your Custom Dimensions, update your code snippets or Google Tag Manager tag (for those using Google Tag Manager).

Let’s walkthrough updating a code snippet first.

Replace the Code Snippet

All you need to do is replace the current Custom Variable code snippet with the Custom Dimensions snippet. It looks like this: ga(‘set’, ‘dimensionX’, ‘value’).  Where X in dimension is the numerical index of the dimension you are setting, and value is the value you want to be passing to Google Analytics. It’s that simple.

For Google Tag Manager, go to the Universal Analytics tag you want to add the Custom Dimension. Click on More Settings. Then click on Custom Dimension and then + Add Custom Dimension. All you do then is enter the index value in the Index input box, and then enter the value you want getting sent for the dimension in the Dimension input box. Click save and you’re done.

Blog_Post_-_Custom_Dimensions_-_Google_Docs 5