The best way to implement custom variables with Google Analytics I need to use Google Analytics custom variables , but I want to give a different variable value depending of the urls.

I'm checking the G.A module, but I don't see how to define the variables to say when to use one token or other depending of the url.

The only way I see is build a token that checks the url and gives me back the value.

I'm thinking in something more close to Paths Breadcrumbs where you can define context and choose a token/value depending of the context.
"Custom variables" are now Custom dimensions and metrics.

The Google Analytics module supports custom dimensions and metrics.

See the module's README.txt:


  One example for custom dimensions tracking is the "User roles" tracking.
  
  
  In the Google Analytics Management Interface you need to setup Dimension #1    with name e.g. "User roles". This step is required. Do
  not miss it, please.
  Enter the below configuration data into the custom dimensions settings form    under admin/config/system/googleanalytics. You can
  also choose another index,    but keep it always in sync with the
  index used in step #1.
  
  Index: 1    Value: [current-user:role-names]