Replaced Unknown by Direct for traffic comming from undetermined referrers

This commit is contained in:
Alejandro Celaya
2020-03-06 20:42:22 +01:00
parent b89bfa3c1c
commit 96d538db15
3 changed files with 3 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ const updateBrowsersStatsForVisit = (browsersStats, { userAgent }) => {
const updateReferrersStatsForVisit = (referrersStats, { referer }) => {
const notHasDomain = isNil(referer) || isEmpty(referer);
const domain = notHasDomain ? 'Unknown' : extractDomain(referer);
const domain = notHasDomain ? 'Direct' : extractDomain(referer);
referrersStats[domain] = (referrersStats[domain] || 0) + 1;
};