Get more than 7 dimensions in google analytics

2019-04-10 04:42发布

问题:

I am fetching my data from google analytics core api. I came to know that we can fetch only 7 dimensions using api, But here I need to fetch more than 7 dimensions with correct metrics. Is there anyway (other than using paid google analytics) to fetch more than 7 dmensions with correct metrics from google analytics.

If not, then is there any mathematical formula through which we can find intersection of dimensions fetched using 2 different dimensions having one dimension in common.

Thanks

回答1:

The only way i have found around the 7 dimenson limit is to be createive with filters. It will mean that you are sending more querys to the server but if you arnt worried about your quota limit then its doable.

Example: ga:visitorType only has two values. New Visitor, Returning Visitor

So you could run a query with your 7 dimensions. Then add A filter ga:visitorType=New Visitor then run the same 7 dimensions with a filter added of ga:visitorType=Returning Visitor Bingo you just got an 8th dimension.

Again you need to be a little careful becouse you are going to increase the number of querys you run by each value of dimension you are doing createive filtering on. I wouldnt recomend doing it with say ga:landingPagePath becouse the number of landing pages you have is to big. You will end up running to many querys. But there are a few you can do this with. ga:isMobile, ga:deviceCategory, ga:date. Just remember the more createive filters you add the more queryes you end up runing. I had one where i ended up expanding it to 80 requests just to get the data back i needed. Scarry but it worked.



回答2:

Look at this blog post, it explains it all: http://daimto.com/creative-filtering/



回答3:

If you have specific dimensions that can be used to identify a session at a specific time (e.g. a session ID and browser timestamp), you can execute multiple queries then patch them together.

I built a python program that will do exactly this: https://github.com/aiqui/ga-download

This program can bring together multiple groups of dimensions, so that any number of dimensions can be downloaded and combined into a single CSV file.