Commit Graph

243 Commits

Author SHA1 Message Date
Danny van Kooten 5ef2b166ab last 7 & last 30 days should be today-6 and today-29 2018-02-01 22:01:19 -09:00
Danny van Kooten 4028dcab68 expire tracking cookie at local midnight, not utc midnight. fixes issue with immediate cookie expiration on negative utc offsets 2018-02-01 21:51:12 -09:00
Danny van Kooten 221e6394de assume dashboard is public when there are no users in connected datastore. #117 2018-09-12 09:36:59 +02:00
Danny van Kooten c09fda89a3 refactor date logic for preset periods. switch out this week and this month for last-7 and last-30. closes #43 2018-08-07 09:20:22 +02:00
Danny van Kooten 3418e81ea5
Revert "link[href] is already an absolute URL" 2018-07-27 09:08:25 +02:00
Daniel Aleksandersen c6ec64a267
link[href] is already an absolute URL
a[href] and link[href] will both normalize to an absolute URL so there is no need to create an extra a element here.
2018-07-23 05:53:13 +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 d9bce6a0cf set time for dates coming from pikaday too. fixes #88 2018-07-11 14:20:45 +02:00
Danny f7afb8c503 only add path if not already in pagesViewed 2018-07-04 14:43:24 +02:00
Danny van Kooten 37897e9d35 stop sending document title from client, since it is not used right now 2018-06-28 10:37:21 +02:00
Danny van Kooten 9b47ee27ef parse hostname from client instead of relying on http header. fixes #79 2018-06-28 10:37:02 +02:00
Danny van Kooten 67308e3348 default to empty path if parsing from <a> fails. #73 2018-06-23 17:45:53 +02:00
Danny van Kooten ad29167db1 Merge branch 'master' of https://github.com/usefathom/fathom
* 'master' of https://github.com/usefathom/fathom: (23 commits)
  improve security and add persistence for MySQL
  Don’t send Referer headers
  set 'Tk: N' header on resources loaded by client. #65
  disregard requests to /collect with DNT header set to '1'.
  expire client-side session at midnight UTC, for now
  print some info regardless of log level
  use mysql Config.FormatDSN to generate dsn conn string for mysql. closes #56 closes #60
  update go mysql driver
  set explicit charset for mysql tables to workaround key limit of 7xx bytes. #58
  don't concat lastSeen in client-side data. fixes #64
  use https in git clone example in readme (because broader compat). closes #63
  set server addr explicitly in docker-compose file
  update docker-compose file
  add instructions on prebuilt docker img to readme
  get rid of old ana screenshot
  add NULLIF in group statement because of go null values = empty string
  fix postgres errors by converting to null in divisions. closes #54 relates to #52
  use absolute url to readme img
  build npm assets in intermedia docker container so we can auto-build from git push. relates to #49 #51
  client-side assets do not need to be built inside docker container. closes #51
  ...
2018-06-23 17:43:46 +02:00
Danny van Kooten 5d99de5813 lower datepicker timeout 2018-06-23 17:43:44 +02:00
Daniel Aleksandersen 4bed10990e
Don’t send Referer headers
Remove the `Referer` request header when clicking on referrer links in Fathom. This isn’t a public page so keep the secret of its existence.
https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
2018-06-13 21:44:48 +02:00
Danny 70d97b03a1 expire client-side session at midnight UTC, for now 2018-06-13 10:32:50 +02:00
Danny 6e83df2037 don't concat lastSeen in client-side data. fixes #64 2018-06-13 09:08:00 +02:00
Danny 3f57a0e0a8 get rid of old ana screenshot 2018-06-08 16:00:40 +02:00
Danny van Kooten 2446ccb5bb set x and y on rect elements instead of transforming g element 2018-06-07 10:14:11 +02:00
Danny 45637f8599 don't delay graph paint with requestanimationframe 2018-06-06 12:47:45 +02:00
Danny a8a80cba4a do not render hidden x-axes ticks. create svg elements in separate threads whenever possible 2018-06-06 10:05:44 +02:00
Danny 0d8e1d2588 only add day elements for days with data 2018-06-05 15:31:49 +02:00
Danny c845a39295 move data-length condition outside of filter (loop) 2018-06-05 15:23:48 +02:00
Danny 8a4c2a72f5 remove hidden ticks instead of toggling display. needs benchmark. 2018-06-05 15:21:44 +02:00
Danny 30749cf7af re-use some more unchanging variables when changing chart data 2018-06-05 12:33:16 +02:00
Danny 20bb0e40cc add simple loading state 2018-06-05 11:51:09 +02:00
Danny dd7a26241a improve chart performance by re-using canvas 2018-06-04 15:11:56 +02:00
Danny 13a1222f54 improve animation performance of countup by reffing element directly (vs state update) 2018-06-04 14:34:44 +02:00
Danny c2e63a2dd3 improve number format perf 2018-06-04 14:03:50 +02:00
Danny 8ac638abe3 format numbers to never exceed 4 characters. closes #47 2018-06-04 13:32:58 +02:00
Danny 0fc75c19f6 don't zero pad month-day formatin chart 2018-06-04 13:08:19 +02:00
Danny 7bf8978cb6 use a single http request to fetch all data for left-sidebar 2018-06-04 12:53:17 +02:00
Danny 76464854be remove tracking pixel after a short time 2018-06-01 12:11:11 +02:00
Danny e05a6d7f1e Merge branch 'master' into grouped-referrers 2018-06-01 09:29:33 +02:00
Danny 7e01914cf3 set dates for pre-set periods explicitly instead of calculating them from relative base. fixes issue with last & first day of month/year. 2018-06-01 09:29:09 +02:00
Danny van Kooten 2f7f3d7085 merge master 2018-05-31 13:26:06 +02:00
Danny van Kooten 27fa4597fc call gulp from node_modules subdir 2018-05-31 13:16:55 +02:00
Danny van Kooten 4fb57b2cc1 fix date range periods when on last day of month. closes #46 2018-05-31 13:14:17 +02:00
Danny van Kooten 7a8a351f02 use fixed graph height. fixes #41 2018-05-31 08:44:28 +02:00
Danny 071ea5ace0 split hostname and pathname in referrers table 2018-05-30 12:50:28 +02:00
Danny 32693be2b0 add make dist task && separate assets build from binary build 2018-05-29 14:52:34 +02:00
Danny 2aac3d211f fix alignment in table component when there's no data 2018-05-29 13:57:59 +02:00
Danny 4cf8f029af parse server-side timezone into local timezone date. closes #39 2018-05-28 04:11:09 -08:00
Danny f822dbbdb7 convert unix timestamps to local timezone for chart x-axes. fixes #39 2018-05-28 23:30:59 +12:00
Danny bf817eff8e revert padding in left sidebar 2018-05-28 23:30:21 +12:00
Danny 5a89bc6f48 parse dates in preparedata function, compare using local date objects. #39 2018-05-25 05:53:17 -08:00
Danny f70a492f09 set input value property on pikaday element to make sure we have a data in initial view 2018-05-25 15:03:36 +02:00
Danny van Kooten e7e693a71c clean-up state & props delegation. destroy pikaday on unmount. 2018-05-24 17:02:19 +02:00
Danny van Kooten b414f10348 ensure pikaday date is updated when we choose a preset date range 2018-05-24 13:46:26 +02:00
Danny van Kooten a00e72f81d smart date formatting on chart x-axis 2018-05-24 13:35:43 +02:00
Danny 813eb460a3 increase left-margin of chart to allow for larger numbers on y-axis 2018-05-23 16:06:20 +02:00
Danny e2218d0736 fix chart padding 2018-05-23 11:12:05 +02:00
Danny b8f0369724 add basic tooltips in chart 2018-05-23 09:56:33 +02:00
Danny c5b0d051a2 stretch totals sidebar to top, move chart to right area 2018-05-23 09:24:55 +02:00
Danny 60008aa205 show pageview & visitor chart for week/month/year periods 2018-05-22 16:01:59 +02:00
Danny 0101afdc9f fill dates with no data with zeroes & add d3-transition 2018-05-22 15:45:22 +02:00
Danny 7adc5d3bec wip on chart implementation using d3 2018-05-22 12:23:17 +02:00
Danny van Kooten 72c2952e15 use singular if visitor count == 1. closes #34 2018-05-21 11:37:12 +02:00
Danny ae74bb39cc hide custom date nav on very small screens, #32 2018-05-18 11:04:16 +02:00
Danny 16d9fdcf6c minor styling changes to datepicker elements 2018-05-16 17:37:10 +02:00
Danny 44ae5d38f2 move custom date selector to far right, #32 2018-05-16 17:25:50 +02:00
Danny bcae762a35 update document title with realtime visitor count 2018-05-16 17:25:29 +02:00
Danny 0ecd4ec251 use pikaday for the date component, closes #32 2018-05-16 17:02:46 +02:00
Danny f082231b12 implement logic to get a working html5 input date. #32 2018-05-16 13:54:52 +02:00
Danny a0bb890210 wip... show input date field 2018-05-16 12:57:03 +02:00
Danny 7d8d0b9c42 show current date range in date-nav, #32 2018-05-16 11:51:40 +02:00
Danny 50771a6314 browser offset should be substracted, not added #31 2018-05-16 03:26:56 -06:00
Danny f0d255c26b limit animation progress to 1 in case tab loses focus or lags 2018-05-16 03:26:44 -06:00
Danny 9cb8d443ec add local timezone offset to utc timestamps we send to server. #31 2018-05-16 11:10:53 +02:00
Danny 0caf52b780 use local timezone in client, utc timezone on server. should close #31 2018-05-16 03:54:51 -05:00
Danny fc552b0508 set start variable outside of tick loop 2018-05-16 10:16:13 +02:00
Danny 9f6684f0fb fix rounding issue for percentage values 2018-05-16 10:10:23 +02:00
Danny van Kooten ce00a975b4 animate numbers in count widget 2018-05-15 22:26:24 +02:00
Danny bbfb5d0b5f check for unauthorized status code to auto-logout on auth errors 2018-05-15 14:32:30 +02:00
Danny a4be3ef3a7 use status code as error message 2018-05-15 14:32:01 +02:00
Danny 1e60fc8102 access props through function arg 2018-05-15 14:31:51 +02:00
Danny 73e011b6cc implement notfound handler with simple 404 page, closes #19 2018-05-14 12:08:18 +02:00
Danny 6482378734 serve assets from /assets subdir and re-use packr box for index.html & tracker.js 2018-05-14 11:17:41 +02:00
Danny 9b037389f5 fire off request for fetching totals earlier 2018-05-11 16:07:13 +02:00
Danny 04d1065698 use pageviews sum to show green percentage bar in pseudo-element 2018-05-11 15:49:52 +02:00
Danny c25e164eac ignore prerendered pages, #13 2018-05-11 14:42:10 +02:00
Danny 931cc8f775 don't send unneeded var in collect request 2018-05-11 14:34:56 +02:00
Danny 224124c1c9 derive tracker URL from script element if not explicitly set 2018-05-11 14:34:39 +02:00
Danny fb5cd41a34 restyle login page 2018-05-11 14:15:58 +02:00
Danny 3c823e9351 delay initial request until datepicker component bubbled up the correct period 2018-05-09 10:55:56 +02:00
Danny b5d5996c90 use UTC times in client-side datepicker 2018-05-09 10:35:31 +02:00
Danny 61753a713c delete unused img files for country flags 2018-05-08 14:52:03 +02:00
Danny b4c7de0880 store hostname for each pageview & page stat 2018-05-08 13:21:36 +02:00
Danny 5fe5b97e94 use realtime poll to catch expired/invalid login sessions 2018-05-08 13:21:14 +02:00
Danny 0a0476b5ae store accurate new session count & use that to determine bounce rate 2018-05-08 11:52:01 +02:00
Danny fe7eee2b73 clean-up data structure & add indices 2018-05-08 10:45:17 +02:00
Danny van Kooten 5e0ac22fe4 and finally, delete pageviews after processing to keep pageviews table nice & small 2018-05-07 19:45:42 +02:00
Danny van Kooten 95cd0e4053 implement referrers table 2018-05-07 19:33:52 +02:00
Danny van Kooten 9a9ea1687c imment referrer stats api route 2018-05-07 19:20:58 +02:00
Danny dac50c3da9 start cleaning up & implement page stats again 2018-05-07 17:01:20 +02:00
Danny 433c6e2f4d get general data flow up & running again for site stats 2018-05-07 16:05:53 +02:00
Danny van Kooten 082073afb8 [wip] move bulk of storage to client-side for improved scalability, simplicity and privacy. see #14. 2018-05-06 11:53:19 +02:00
Danny 5a403d536a first stab at time on site tracking. #20 2018-05-04 15:43:05 +02:00
Danny 86e5a7a957 simple bounce rate implementation. #21 2018-05-04 12:20:37 +02:00
Danny 5f626f1143 use simple loading class to indicate loading state. 2018-05-04 11:05:55 +02:00