Frage

We are working on website traffic monitoring and we are using Google Analytics API.We are stuck up with these dimensions and metrics. We are still not able to decode the combination of these two,as to how one dimension can be used with other metrics.

I checked the stack overflow site, and went through the Google Analytics tools explorer1 http://ga-dev-tools.appspot.com/explorer/.

We also went through https://developers.google.com/analytics/devguides/reporting/core/dimsmets#cats=visitor We know when we hover over any particular dimension/metric a checkbox appears. We need to check it and see the items which are grayed out[those are the non allowed with that particular dimension /metrics].

After all these exploration, we wrote down a query:

return analytics.data().ga()
        .get(tableId,"2014-01-07","2014-03-01", "ga:visitors")
        .setDimensions("ga:visitorType,ga:visitCount,ga:city,ga:browser,ga:date")
            .setMetrics("ga:visitors,")
                   .setMaxResults(25)
        .execute();

And we get the following output(Sample) :

ga:visitorType  ga:visitCount  ga:browser  ga:city  ga:date  ga:visitors  New Visitor 1 Chrome (not set) 01-23-2014 1 New Visitor 1 Chrome Bangalore 01-23-2014 1

Can anyone explain, below doubts:

  1. What the visitCount and visitors specify here?
  2. How combination of dimensions and metrics work. Basically what I mean is how the combination of dimension and metric affects the output?

Any guidance is appreciated!!

War es hilfreich?

Lösung

ga:visitCount

The visit index for a visitor to your property. Each visit from a unique visitor will get its own incremental index starting from 1 for the first visit. Subsequent visits do not change previous visit indicies. For example, if a certain visitor has 4 visits to your website, visitCount for that visitor will have 4 distinct values of '1' through '4'.

Lets look at your data:

ga:visitorType  ga:visitCount  ga:browser  ga:city    ga:date   ga:visitors 
New Visitor          1          Chrome    (not set)  01-23-2014     1 
New Visitor          1          Chrome    Bangalore  01-23-2014     1

On 01-23-2014 you had 2 visitors I know this because there are two rows and because your last column ga:visitors adds up to 2. They where both New Visitors they hadn't been to your site before. Because they hadn't been to your site before the visitCount is 1.

Lets look at some data from my site:

 ga:visitorType      ga:visitCount  ga:date     ga:visitors  
  New Visitor          1            01-23-2014     17 
  Returning Visitor    10           01-23-2014      1 

Using just those to rows what does that tell you. On 01-23-2014 I had 18 visitors because the 17 and 1 will add up to 18. Of them 17 where New visitors they hadn't been to my site before. 1 was a returning visitor who had visited my site 10 times previously(VisitCount).

Your second question is very open trying to explain how dimensions and metrics fit together is going to be a bit hard. You need to be more specific. But basically a dimension is a thing, the page they look at, the page they came from, what city they live in .... a metric is a number that you can add up or subtract from. 8 people visited my site from Google. The 8 comes from the metric visits the site they are coming from is a dimension. Again this is very hard to explain here.

Read though Dimension and metric refrence and look at the different reports on the GA website. It tells you what dimensions and metrics its using in those reports you should be able to map them back to the API.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top