Custom Dimen­sions are the equiv­a­lent to Custom Vari­ables from the classic version of Google Analyt­ics (GA). The main differ­ences for most users of Custom Vari­ables are creat­ing Custom Dimen­sions prior to using them and the amount avail­able.

Custom Dimension Limits:

  • Stan­dard users had 5 slots/indices for Custom Vari­ables and now have 20 slots/indices for Custom Dimen­sions
  • Premium users had 50 slots/indices for Custom Vari­ables and now have 200 slots/indices for Custom Dimen­sions

Creating Custom Dimensions:

Contrary to Custom Vari­ables being created and sent within GA code on a page or appli­ca­tion, Custom Dimen­sions must first be created within the Admin inter­face of each GA prop­erty.

Process for creat­ing Custom Dimen­sions in GA:
Note that your prop­erty will need to be a Univer­sal Analyt­ics prop­erty in order to create Custom Dimen­sions. If you need to migrate your prop­erty, click here <> to learn more about this process.

  1. Navi­gate to the Admin inter­face of the Prop­erty you would like to create Custom Dimen­sions in.
  2. Under the Prop­erty (middle) column click on the ‘Custom Defi­n­i­tions’ tab and select ‘Custom Dimen­sions’. 1. If ‘Custom Dimen­sions’ is not an option, you will need to upgrade your prop­erty to Univer­sal Analyt­ics <>
  3. Click the ‘New Custom Dimen­sion’ button.
  4. Give your custom dimen­sion a name. 1. If you are tran­si­tion­ing from using Custom Vari­ables to Custom Dimen­sions, you will likely want to use the same naming conven­tion for Custom Dimen­sions.
  5. Give your Custom Dimen­sion a scope. Your options for scope are:3 1. Hit – In Google Analyt­ics, Custom Dimen­sions are sent along with other hit types, includ­ing pageviews, events, or ecom­merce track­ing calls. If the scope is set to ‘Hit’ the Custom Dimen­sion value will only be applied for the hit it was attached to.
  6. Session – A scope of ‘Session’ applies the Custom Dimen­sion values to all hits of a user’s session, regard­less of when the Custom Dimen­sion occurred within the session. For example, if the fourth hit of a session included a Custom Dimen­sion value with a Session level scope, the Custom Dimen­sion value will be attached to all preced­ing and future hits within that session.
  7. User – User scoped Custom Dimen­sions are very similar to Session scoped Custom Dimen­sions; however, with User scoped Custom Dimen­sions all future session hits of the user will also contain the Custom Dimen­sion value. 1. It is impor­tant to note that User scoped Custom Dimen­sions will only apply to the current and future sessions. Histor­i­cal user sessions will not be reprocessed to include the Custom Dimen­sion value, even if it is set to a User scope.

Deploying Custom Dimensions:

There are two methods for deploy­ing Custom Dimen­sions on your website:

  1. The set command. Using the set command to record Custom Dimen­sions in Univer­sal Analyt­ics will append the Custom Dimen­sion value to every hit on the page, after the set command has been called. The proper syntax for the set command is below. Note that you only need to include the index of the Custom Dimen­sion (dimen­sionX) and the value (value) you want to send. The Custom Dimen­sion index will corre­spond to the index number of the Custom Dimen­sion name in the GA admin inter­face you are sending values to, so an index of 4 would be ‘dimension4’.  The name and the scope of the Custom Dimen­sion will be processed on the backend of GA, based on your created Custom Dimen­sions.
    //code block
    ga(‘set’, ‘dimen­sionX’, value);
  2. The send command. Custom Dimen­sions sent via the send command are directly attached to a corre­spond­ing hit, such as a pageview or an event. Unlike the set command, the send command will only apply the Custom Dimen­sion to the hits on a page that include Custom Dimen­sion infor­ma­tion. For example, if you want to send a Custom Dimen­sion when someone performs a specific event, the send command for the event would look like the follow­ing, where as before dimen­sionX corre­sponds to your Custom Dimen­sion index and value is the value being sent for the Custom Dimen­sion:
    //code block
    ga(‘send’, ‘event’, ‘event­Cat­e­gory’, ‘even­tAc­tion’, {‘dimen­sionX’: value});