Segmentation and filtering are two important concepts that you should leverage when using web analytics tools (http://youngsday.com/2013/10/30/12-tools-that-will-drive-your-conversion-rate/#sthash.wNLqs0xC.dpbs). Custom variables (CV) constitute an extra layer of segmentation that you can customize and set according to your analytics needs. For example, you could set a CV in order to know which product is being bought by your customers coming from a specific traffic source. This post aims to introduce Google Analytics’ CVs and various ways to use them.
How to Use Google Analytics Custom Variables?
_gaq.push([“_setCustomVar”, index, name, value, opt_scope]);
• index—The slot for the custom variable. Required. This is a number whose value can range from 1 – 5, inclusive. A custom variable should be placed in one slot only and not be re-used across different slots.
• name—The name for the custom variable. Required. This is a string that identifies the custom variable and appears in the top-level Custom Variables report of the Analytics reports.
• value—The value for the custom variable. Required. This is a string that is paired with a name. You can pair a number of values with a custom variable name. The value appears in the table list of the UI for a selected variable name. Typically, you will have two or more values for a given name. For example, you might define a custom variable name gender and supply male and female as two possible values.
• opt_scope—The scope for the custom variable. Optional. As described above, the scope defines the level of user engagement with your site. It is a number whose possible values are 1 (visitor- level), 2 (session-level), or 3 (page-level). When left undefined, the custom variable scope defaults to page-level interaction. 
Before defining any CV, make sure to fully understand the analytics tool that you are using, the metrics and dimensions it offers, etc. Then, depending on the nature of your business, define and implement CVs that will help you complement the existing dimensions. For example, if your website is an e-commerce website, you could define the following CVs:
1. Product views: track the e-commerce and onsite metrics of each product. You will gain a strong insight into the visibility that each product is getting and the performance it is achieving
2. Voucher: track the voucher codes that you are distributing via your various online and offline marketing campaigns
3. Payment methods: track the usage of the various payment methods you are offering on your website. The analysis of the payment step will allow you to improve your checkout funnel and, hence, your website’s conversion rate
In addition, if your website is a content website (news, blog, etc.), you could define the following CVs:
1. Authors: measure the content’s performance that your authors are creating. You could decide to work more closely with certain authors in order to increase engagement
2. Categories: track and understand the onsite metrics of each category you are offering on your website
3. Newsletter subscription: track the subscribers to your newsletter and analyze their behavior on your website
Implementing, tracking and analyzing custom variables will allow you to discover and understand hidden spots that your analytics’ tool does not offer by default. Make sure to always customize and personalize the outputs of your analytics’ tool in order to get a stronger insight into your visitors’ behavior on your website.
 Cover Image: http://www.l3analytics.com/wp-content/uploads/2011/09/Custom-Variable-Custom-Report.png