mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
default value for pageview.IsBounce should be true, not false.
This commit is contained in:
parent
6bc1af3564
commit
f92d04a4ba
@ -61,6 +61,8 @@ func (c *Collector) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
IsUnique: q.Get("u") == "1",
|
IsUnique: q.Get("u") == "1",
|
||||||
Referrer: parseReferrer(q.Get("r")),
|
Referrer: parseReferrer(q.Get("r")),
|
||||||
IsFinished: false,
|
IsFinished: false,
|
||||||
|
IsBounce: true,
|
||||||
|
Duration: 0,
|
||||||
Timestamp: now,
|
Timestamp: now,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ func (db *sqlstore) InsertPageviews(pageviews []*models.Pageview) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// generate placeholders string
|
// generate placeholders string
|
||||||
placeholderTemplate := "(?, ?, ?, ?, ?, ?, ?, ?, ?, FALSE, FALSE, 0),"
|
placeholderTemplate := "(?, ?, ?, ?, ?, ?, ?, ?, ?, TRUE, FALSE, 0),"
|
||||||
placeholders := strings.Repeat(placeholderTemplate, n)
|
placeholders := strings.Repeat(placeholderTemplate, n)
|
||||||
placeholders = placeholders[:len(placeholders)-1]
|
placeholders = placeholders[:len(placeholders)-1]
|
||||||
nPlaceholders := strings.Count(placeholderTemplate, "?")
|
nPlaceholders := strings.Count(placeholderTemplate, "?")
|
||||||
@ -44,7 +44,7 @@ func (db *sqlstore) InsertPageviews(pageviews []*models.Pageview) error {
|
|||||||
for i := range pageviews {
|
for i := range pageviews {
|
||||||
|
|
||||||
// test for columns with ignored values
|
// test for columns with ignored values
|
||||||
if pageviews[i].IsBounce != false || pageviews[i].Duration > 0 || pageviews[i].IsFinished != false {
|
if pageviews[i].IsBounce != true || pageviews[i].Duration > 0 || pageviews[i].IsFinished != false {
|
||||||
log.Warnf("inserting pageview with invalid column values for bulk-insert")
|
log.Warnf("inserting pageview with invalid column values for bulk-insert")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user