Google Analytics API - Choosing a Metric Value Affects Dimension Values?

Good morning. I saw this behavior in the Google Analytics API, which, as an SQL guy, I find fancy. I would like to get a list of all the values ​​for adContent, so I request ga:adContentand (because I also have to select the metric, for some well-defined reason) ga:organicSearches. He is in the same group (Campaign), so perhaps he will work better on the server.

I get one line: adContent is "(not set)", organicSearches - 516 674. Ha, I think adContent is not used. But the marketing department swears it is, and cause some convincing screenshots.

In the future, I arbitrarily change the metric to ga:transactions. In the universe in which I woke up, this should by no means affect anything other than the actual value returned in this column. Instead, I get zillions of strings, with plausible values ​​for ga:adContent. The value for is ga:transactionssometimes zero, so this is not the case when GA is filtered for "metric> 0".

There are no filters in my request. I did not change the date range between the two options. Can someone tell me what is going on? I expect the above queries to translate to something like this, which should return exactly the same number of rows:

SELECT adContent, SUM(organicSearches)
FROM Campaign
WHERE Date BETWEEN X AND Y
GROUP BY adContent

SELECT adContent, SUM(transactions)
FROM Campaign INNER JOIN ECommerce ON <something>
WHERE Date BETWEEN X AND Y
GROUP BY adContent

I understand that GA probably doesn't use the regular RDMS at the back end, but certainly 1 + 1 is still 2 in any database!

+3
1

ga:organicSearches ga:adContent ( ). ga:adContent , ga:organicSearches - (, Google , - ). , .

SQL- ; Google Analytics SQL , , , . IIRC, , BigTable, NoSQL.

Google Paper on BigTable 2006 :

Google Analytics. (200 ) . name - , - , . , , - , . 14% . (20 TB) -. MapReduce . MapReduce . . 29% .

, ga:pageviews.

+3

Source: https://habr.com/ru/post/1792578/


All Articles