Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want to have a go rolling your own web analytics calculations, I would recommend setting up SnowPlow (https://github.com/snowplow/snowplow) and then following through the SnowPlow Web Analyst's Cookbook (start with the simple recipes here: http://snowplowanalytics.com/analytics/basic-recipes.html).

Here's a simple example for unique visitors by month:

    SELECT
    YEAR(dt),
    MONTH(dt),
    COUNT(DISTINCT(user_id))
    FROM events
    GROUP BY YEAR(dt), MONTH(dt) ;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: