paullangtree / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
2 stars 0 forks source link

RFE: Aggregate data API #804

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
---------------------------------------------------------------------------
NOTE: This tool is not designed to request help. It is only for reporting
issues and requesting features for the Google Analytics libraries.

If you are a developer and you need help, visit:
https://developers.google.com/analytics/help/

If you are not a developer and you need help, visit:
https://support.google.com/analytics
---------------------------------------------------------------------------
Name of related component: Core Reporting API

Please refer to 
http://stackoverflow.com/questions/33607178/getting-page-views-and-other-data-fo
r-a-single-url-or-similar-urls

We are currently unable to access data for pages unless they were created 
"recently" (perhaps within the last month or two). Requests are timing out due 
to the volume of data that needs to be scanned.

Would it be possible to add an aggregate data service that allowed us to query 
aggregated data instead of having it scan all rows for relevant data?

To illustrate:

If we had the following requests:

URL - DATE       - REFERRER
/a  - 2015-12-01 - google
/b  - 2015-12-01 - google
/a  - 2015-12-05 - example.com
... millions more.

The following data would be stored in addition (in a separate table/database):

URL - START DATE - END DATE   - PAGE VIEWS - REFERRERS
/a  - 2015-12-01 - 2015-12-05 - 2          - 2
/b  - 2015-12-01 - 2015-12-01 - 1          - 1

And (ideally) there would be another table that lists all unique referrers per 
URL.

Now, if we wanted to access the total page views for a URL, or the total number 
of unique referrers, it would only need to scan & return a single row, instead 
if (potentially) millions, and requests would no longer time out.

The API should still support regex matching, as we usually need to group 
related URLs (with slight differences, for example /123-title and 
/123-new-title).

Original issue reported on code.google.com by glen...@gmail.com on 1 Dec 2015 at 8:44