Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do Web Analytics such as Google Analytics use Dimensions and Metrics instead of SQL statement?

Just when I get quite familiar with SQL statements once again, when pulling data from Google Analytics, I found that they don't use SQL, but rather, use Dimensions and Metrics and the combinations of them.

Why is a reason for that? I think it doesn't have a SQL interface (or a plain web server log download)? If so, how do SQL statements translate to Dimension, Metrics (and Segment and Filters)?

It seems that Metrics tend to be the "aggregates" such as count() or average(), and Dimension tends to be the logged values themselves (such as Browser == IE or Country == Australia), which is the same as the group by values. Filters is like conditionals, and what about Segment?

It seems that if we specify Dimensions, then it automatically does a group by and display that field as well. It does count() or sum() usually. What if we want average(*) instead? And what if we want it to show but don't want it to do a group by?

example website to experiment is at http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html

like image 292
nonopolarity Avatar asked Aug 10 '10 01:08

nonopolarity


People also ask

What is dimensions and metrics in Google Analytics?

Dimensions are attributes of your data. For example, the dimension City indicates the city, for example, "Paris" or "New York", from which a session originates. The dimension Page indicates the URL of a page that is viewed. Metrics are quantitative measurements.

What is the function of Google Analytics and what are the key metrics of this important resource?

Google Analytics enables users to track up to 200 different metrics to measure how their websites are performing. While some metrics may be more valuable to certain businesses than others, these are some of the most popular metrics: Users. A user is a unique or new visitor to the website.

What is Google Analytics and main purpose of Google Analytics?

Google Analytics is a platform that collects data from your websites and apps to create reports that provide insights into your business.

Can you use SQL in Google Analytics?

Google Analytics and SQL: A Powerful Combo Google Analytics is a powerful tool. However, you can also export information from GA to create SQL reports that will give you even more insight into your data. And if you've analyzed this article well, you already know that learning SQL will pay off for sure.


1 Answers

use of the terms "Dimensions" and "Metrics" suggests that Google are using an OLAP database rather than a relational database.... SQL is used for relational databases: OLAP uses MDX or proprietary query languages (if Oracle).

From http://en.wikipedia.org/wiki/OLAP

The core of any OLAP system is an OLAP cube (also called a 'multidimensional cube' or a hypercube).

It consists of numeric facts called measures which are categorized by dimensions.

like image 107
Mark Baker Avatar answered Sep 21 '22 14:09

Mark Baker