Mobile app version of vmapp.org
Login or Join
Berumen354

: Can I show a table of one custom variable against another? We have a number of custom variables set up in google analytics. We'd like to show a table of event occurrences broken down by

@Berumen354

Posted in: #GoogleAnalytics

We have a number of custom variables set up in google analytics. We'd like to show a table of event occurrences broken down by two custom variables, e.g. if variable one can be A, B, or C and variable two can be J, K or L:

Events | A | B | C |
-------+-----+-----+-----+
J | 345 | 65 | 12 |
K | 234 | 43 | 7 |
L | 123 | 21 | 4 |
-------+-----+-----+-----+


How do I get the information in that format?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Berumen354

2 Comments

Sorted by latest first Latest Oldest Best

 

@YK1175434

The Google Analytics API Query Explorer provides a simple interface for querying the Google Analytics API. So, if you're not looking to build an API tool, you can just setup your query in the Query Explorer, and bookmark the permalink it gives you, to easily extract your data.

So, I'm going to build you a sample query that meets this explanation.

Let's say your two variables are stored in the first and second slot. That means we'll set our dimensions to be the values (not the names) of the first two slots.

The metric you're interested in retrieving sounds like its Total Events (but you could also use unique events).

Then, you want to filter the results to be only those that triggered the particular category/action/label combination you want.

The resulting query looks like this:


Dimensions: ga:customVarValue1,ga:customVarValue2

Metrics: ga:totalEvents

Filter:ga:eventCategory==CATEGORYVALUE;ga:eventAction==ACTIONVALUE;ga:eventLabel==LABELVALUE


The data returned would look something like this:


You can try out and customize this query here.

10% popularity Vote Up Vote Down


 

@Rivera981

I'm going to assume you want this on your webpage.

Set up your webpage by following the tutorial here:
code.google.com/apis/analytics/docs/gdata/1.0/gdataJavascript.html
Then on the section header of "Retrieve Report Data," use this to filter your results:
code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html
Let me know how it goes.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme