Using: Universal Analytics (analytics.js)
I'm currently tracking a custom dimension called 'animals' with an index of 3 and values 'pig' and 'cow'. I am trying to set up an application that can match user-input strings to their dimensionXX counterparts. For example, an input of 'animals' would match to 'dimension3'.
In addition, I'd like to be able to determine what values are held within this dimension, or at least output query data with these dimension values attached:
date | visits | dimension3 '2013-11-1' | 4 | 'pig' '2013-11-1' | 8 | 'cow' '2013-11-2' | 7 | 'pig' '2013-11-2' | 1 | 'cow' '2013-11-3' | 14 | 'cow'
I am trying to accomplish two things:
- Identify that dimension3 is called 'animals'
- Identify what values are in dimension3 ('pig' and 'cow')
gapi.client.analytics.data.ga.get({
'ids': 'ga:' + profileId,
'start-date': '2013-11-11',
'end-date': '2013-11-20',
'metrics': ???,
'dimensions': 'ga:dimension3',
}).execute(callbackFunc);
I had considered using filters or segments but both yielded no results. Any ideas on how to get this to work?