Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion website/src/utils/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,18 @@ function trackPageview() {
}
const gc = typeof window !== 'undefined' ? window.goatcounter : null
if (gc && typeof gc.count === 'function') {
gc.count({ path: window.location.pathname, title: document.title })
gc.count({
path: window.location.pathname,
title: document.title,
// Report the referrer only on the initial load (handled by count.js).
// document.referrer is fixed for the whole SPA session, so without this
// every in-app view would be re-credited to the entry referrer (e.g.
// heise), inflating that referrer's page list. A callback returning ''
// drops the referrer for client-side navigations.
referrer: function () {
return ''
},
})
}
}

Expand Down
Loading