90 Commits

Author SHA1 Message Date
Danny van Kooten
dc8bf7fdc3 modify tracker.js to take a siteId and insert that into pageviews table. add siteId to tracking snippet. 2018-10-05 10:07:00 +02:00
Danny van Kooten
4c4a42879c fix ID assignment in SaveUser func 2018-10-04 13:44:36 +02:00
Danny van Kooten
927c50b419 add & delete sites through api 2018-10-03 15:27:36 +02:00
Danny van Kooten
61cc23eb0d fetch sites from server & update dashboard state from site switcher 2018-10-03 11:54:48 +02:00
Danny van Kooten
f721b75f43 modify SaveUser to support updating existing users 2018-10-03 10:47:23 +02:00
Danny van Kooten
4b855c6d05 add site related func to sqlstore 2018-10-03 10:44:31 +02:00
Danny van Kooten
26d7ba5578 Merge branch 'master' into multiple-sites
* master:
  use classnames to determine main-col
  add actual lib 😅
  use classNames for table row width
  use classname for active state
  use classnames for loading state
  add classnames as a dependency
  update README on new user command
  rework user cli management
2018-10-02 11:02:19 +02:00
Danny van Kooten
7c3adcb10b rework user cli management 2018-09-26 14:44:13 +02:00
Danny van Kooten
f0eecc04cd add sites table & site_id columns for multi-site tracking #50 2018-09-25 15:03:07 +02:00
Danny van Kooten
d116f1fd70 limit buffer capacity to 99 pageviews, hotfix for #132 2018-09-21 09:30:05 +02:00
Danny van Kooten
2ff9676043 always show at least 1 visitor if there are pageviews. #129 2018-09-19 08:21:04 +02:00
Vincent Boutour
e712f0fcdd
Adding /health endpoint and using it in container 2018-09-17 17:20:48 +02:00
Danny van Kooten
291d53fcaf add CountUsers func to sqlstore 2018-09-12 09:11:50 +02:00
Danny van Kooten
4ecaff85ac don't parse database driver from URL to also support mysql and sqlite. 2018-07-31 15:29:15 +02:00
Charley DAVID
98970057a2
Add support for FATHOM_DATABASE_URL 2018-07-31 08:41:08 -03:00
Danny van Kooten
e90e100f18 fix query args for batch updating pageviews 2018-07-30 10:51:20 +02:00
Danny van Kooten
b6f3be0e8e build postgres dsn string dynamically 2018-07-30 09:33:49 +02:00
Danny van Kooten
658581b744 show prettier error msg when connecting to database fails 2018-07-27 08:52:53 +02:00
Danny van Kooten
2ef550bc27 reduce number of memory allocations in hot path 2018-07-15 10:05:03 +02:00
Danny van Kooten
b2d881e31b optimize sql generation in datastore.InsertPageviews func. 2018-07-15 09:36:28 +02:00
Danny van Kooten
1fea0dc66f return error from datastore.Close func 2018-07-15 09:20:07 +02:00
Danny van Kooten
1e128e6ad7 use simple for loop in bulk datastore funcs for minor perf improvement 2018-07-15 07:37:45 +02:00
Danny van Kooten
a6f9b385a3 option to set sslmode param in postgres & mysql connections using FATHOM_DATABASE_SSLMODE. closes #93 closes #90 closes #80 2018-07-12 13:37:52 +02:00
Danny van Kooten
f2683d1f0c buffer insert & updates of pageviews for performance gain under heavy load. closes #24 2018-07-12 13:30:32 +02:00
Danny
42008ab83f get rid of session_id and move knowledge of previous pageview to client. this also gets rid of the (only) index on the pageviews table, allowing for much faster INSERT's. closes #14 2018-07-11 15:03:56 +02:00
Danny
e795eb1ac1 print some info regardless of log level 2018-06-13 10:10:56 +02:00
Danny
7f61259df3 use mysql Config.FormatDSN to generate dsn conn string for mysql. closes #56 closes #60 2018-06-13 10:04:42 +02:00
Danny
958e653b1f set explicit charset for mysql tables to workaround key limit of 7xx bytes. #58 2018-06-13 09:56:32 +02:00
Danny
50c0d9ccd0 add NULLIF in group statement because of go null values = empty string 2018-06-08 16:00:32 +02:00
Danny
e2294c4b6c fix postgres errors by converting to null in divisions. closes #54 relates to #52 2018-06-08 15:39:38 +02:00
Jay Nagpaul
0ab5d12e1b Fix Postgres Migration 2018-06-07 16:36:31 -04:00
Danny
7bf8978cb6 use a single http request to fetch all data for left-sidebar 2018-06-04 12:53:17 +02:00
Danny
a72df6274f generate sql statement dynamically 2018-06-01 13:21:54 +02:00
Danny
8c6e07255f failsafe sql for referrer migrations 2018-06-01 13:21:40 +02:00
Danny
c9213b0b72 set pipe concat mode when using mysql 2018-06-01 11:44:11 +02:00
Danny
6f45edc790 fix groupby with null values 2018-06-01 11:43:59 +02:00
Danny
b856477d2a fix sqlite datastore compat, concat does note xist there 2018-05-30 13:29:20 +02:00
Danny
071ea5ace0 split hostname and pathname in referrers table 2018-05-30 12:50:28 +02:00
Danny
df7496a80d add known_durations column and use that for calculating duration averages, instead of total # pageviews 2018-05-28 15:31:40 +02:00
Danny
eddb1e9566 write info level after connecting to database 2018-05-25 14:12:32 +02:00
Danny
fc35d68926 output log messages during bootstrap, eg with config file location 2018-05-23 09:03:42 +02:00
Danny
7c3cecad09 use errorf log when database migrations fail 2018-05-22 16:20:43 +02:00
Danny
7adc5d3bec wip on chart implementation using d3 2018-05-22 12:23:17 +02:00
Danny van Kooten
3b8a884991 godoc improvements 2018-05-21 11:54:01 +02:00
Danny
c30e5b3120 introduce datastore interface & stop relying on package var to retrieve db conn. relates to #29 2018-05-15 13:30:37 +02:00
Danny
8b639d348d lowercase all log messages and strip newlines 2018-05-15 10:26:35 +02:00
Danny
4aac79c7f9 coalesce query results to handle nil 2018-05-14 10:17:58 +02:00
Danny van Kooten
7d111a8372 Merge branch 'master' of https://github.com/usefathom/fathom
* 'master' of https://github.com/usefathom/fathom:
  fire off request for fetching totals earlier
  use pageviews sum to show green percentage bar in pseudo-element
  add api routes for getting aggregated pageview sum for pages & referrers
  ignore prerendered pages, #13
  don't send unneeded var in collect request
  derive tracker URL from script element if not explicitly set
  restyle login page
  weight multi-day average for pages & referrers too. #23
  weight site averages when calculating multi-day average. closes #23
  only update average duration if we know time on page.
2018-05-12 14:49:23 +02:00
Danny van Kooten
618e85e53b unique index on daily_page_stats should include hostname 2018-05-12 14:49:21 +02:00
Danny
dbcc0545a2 add api routes for getting aggregated pageview sum for pages & referrers 2018-05-11 15:49:37 +02:00