Jacob Evelyn
c461afa679
Change tracker.js Cache-Control header to no-store
...
According to all documentation I can find, `no-store` is the strongest "do not cache" `Cache-Control` header there is, and `no-cache` and `must-revalidate` are strictly weaker and will have no effect when `no-store` is present. Additionally, I cannot find any evidence that these other values are useful for backwards compatibility or older browsers, and `no-store` support appears to be universal. Lastly, webhint.io is specifically telling me that I should not use `must-revalidate`.
2019-10-17 07:50:19 -04:00
Danny van Kooten
5e4ce53eb8
sqlite re-uses ID for columns not marked as autoincrement, so use that. fixes #202
2019-02-04 13:58:25 +01:00
Danny van Kooten
f9ae32f871
empty report should have PoolEmpty: true value to prevent aggregator from re-running
2018-12-24 12:27:21 +01:00
Danny van Kooten
23793bde60
log duration for aggregation func
2018-12-24 12:04:29 +01:00
Danny van Kooten
eb2eb726f3
keep running aggregator job until pageview pool is emptied.
2018-12-24 09:41:11 +01:00
Danny van Kooten
634baac518
explicitly declare innodb as storage engine for mysql databases & only index first 100 chars of index columns. closes #198
2018-12-24 09:10:11 +01:00
Danny van Kooten
67277ec26f
increase busytimeout for sqlite to 10s
2018-12-24 09:09:22 +01:00
Danny van Kooten
02ba5b3793
use explicit route for index.html in case browser adds it. fixes #193
2018-12-10 09:32:38 +01:00
Danny van Kooten
3656fef69d
discard requests to /collect with missing requried query vars
2018-11-26 10:37:52 +01:00
Danny van Kooten
a04307e0de
use LIMIT #, OFFSET # syntax for compat across all database drivers. fixes #188
2018-11-22 21:19:52 +01:00
Danny van Kooten
019b7c9743
show pagination arrows in table component which allows paginating the table results. closes #153
2018-11-20 12:11:35 +01:00
Danny van Kooten
e24c06aadd
correctly set version, commit & date through ldflags in goreleaser config. closes #186
2018-11-20 09:25:24 +01:00
Danny van Kooten
da87d2a173
fix aggregate queries for postgresql
2018-11-14 14:14:19 +01:00
Danny van Kooten
da6ffde2ea
speed up host & pathname migration by using UNION. perform VACUUM for SQLite migrations.
2018-11-14 12:40:01 +01:00
Danny van Kooten
e92b4b9a29
clean-up route & func names
2018-11-14 11:47:47 +01:00
Danny van Kooten
7ccdea4535
don't COALESCE when it's unnecessary
2018-11-14 10:27:14 +01:00
Danny van Kooten
5610a0a4f2
Merge branch 'hourly-storage'
2018-11-14 10:04:16 +01:00
Danny van Kooten
bdd0c5a5c0
set local timezone to UTC on app boot
2018-11-14 09:31:47 +01:00
Danny van Kooten
b5ee8ea5f0
in postgresql, pageviews.timestamp column should be without timezone
2018-11-14 09:31:34 +01:00
Vincent
40ba2e26da
Adding gzip compression for HTTP and Headers for tracker's sec ( #181 )
...
Thanks @ViBiOh!
2018-11-13 15:25:55 +01:00
Danny van Kooten
2ca1e0f36e
switch to hourly storage for stats.
...
- allows showing an hourly chart on the 'today' view
- fixes timezone issues when in 'today' view #134
- increases size of stats tables by factor 24, but that should be less of an issue after dbcadcd73772258f2d2fd781673e559d5ed74dba
2018-11-13 15:23:18 +01:00
Danny van Kooten
21c0f97b1b
cannot vacuum from inside a transaction
2018-11-13 11:16:23 +01:00
Danny van Kooten
dbcadcd737
normalize hostname and pathname columns
...
to save on disk storage
2018-11-12 14:45:21 +01:00
Danny van Kooten
bca066b614
improved referrer parsing. match hostname against blacklist using community-maintained blacklist file graciously provided by Matomo ( https://github.com/matomo-org/referrer-spam-blacklist ). closes #170 relates to #154
2018-11-09 10:39:14 +01:00
Danny van Kooten
cb25b267da
show only database name and maybe host when logging successful db connection. #174
2018-11-02 12:30:34 +01:00
Danny van Kooten
4dec431c4b
use unexported values for sqlstore.Config struct fields
2018-11-02 11:50:43 +01:00
Christopher "Chief" Najewicz
acd182689b
Obfuscate DSN password when logging connection details, fixes #174 ( #176 )
2018-10-30 20:10:21 +01:00
Danny van Kooten
02c2eb93f2
move cmd into pkg/cli and simplify entry point. add goreleaser configuration for automated dist releases.
2018-10-30 20:08:48 +01:00
Danny van Kooten
f92d04a4ba
default value for pageview.IsBounce should be true, not false.
2018-10-10 16:38:29 +02:00
Danny van Kooten
6bc1af3564
set sqlite _busy_timeout to 5s to handle database is locked errors
2018-10-10 11:59:21 +02:00
Danny van Kooten
3b99e78135
set sqlite _busy_timeout to 5s to handle database is locked errors
2018-10-10 11:59:17 +02:00
Danny van Kooten
470db5189d
get rid of some column placeholders so we can increase buffer cap #132
2018-10-10 10:50:05 +02:00
Danny van Kooten
3c934b29fc
add is_finished column indicating whether a pageview is done (ready to be aggregated). closes #123
2018-10-10 10:27:55 +02:00
Danny van Kooten
c877319046
fix DROP INDEX statements for mysql
2018-10-10 10:27:16 +02:00
Danny van Kooten
051d0addb3
fix realtime visitor count query incl. bc for pageviews without an expliti site tracking ID
2018-10-10 09:45:17 +02:00
Danny van Kooten
2f64d56771
alter stats table constraints to take site_id column into consideration
2018-10-10 09:30:52 +02:00
Danny van Kooten
ce8f585827
sqlstore GetXStats funcs should return nil when there are 0 results. #50
2018-10-10 09:02:32 +02:00
Danny van Kooten
1b06bd3179
change precision on numeric columns for postgres so we don't have to apply rounding. closes #116
2018-10-09 13:27:50 +02:00
Danny van Kooten
0f0db205ae
account for empty site_tracking_id in realtime visitor query
2018-10-09 11:57:56 +02:00
Danny van Kooten
84cd897319
use auto increment column for pk on sites table
2018-10-09 11:17:26 +02:00
Danny van Kooten
266d05019a
return json error when authorization middleware fails
2018-10-09 11:17:13 +02:00
Danny van Kooten
80088570b0
default to site_id 1, even though it may not exist yet
2018-10-05 16:07:15 +02:00
Danny van Kooten
21371e2c30
close site settings when pressing ESC
2018-10-05 15:59:36 +02:00
Danny van Kooten
53c1702d0d
only re-fetch data when needed
2018-10-05 15:13:48 +02:00
Danny van Kooten
876309ae59
clean-up sqlstore pkg
2018-10-05 14:34:39 +02:00
Danny van Kooten
d4176de238
get aggregator to take site ID's into account
2018-10-05 14:19:11 +02:00
Danny van Kooten
c1367325e6
modify all routes & queries to take a site ID parameter
2018-10-05 13:09:58 +02:00
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
3674855200
apply authorize middleware to site endpoints
2018-10-04 13:40:52 +02:00