From dc7931a061f58f1670dc43508d2c71fb2d279313 Mon Sep 17 00:00:00 2001 From: rohandebsarkar Date: Fri, 8 Jul 2022 18:00:43 +0530 Subject: [PATCH] Adds 'Direct / None' referrer when no referrer is present --- lib/queries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/queries.js b/lib/queries.js index c21e20ef..a5d7eb7e 100644 --- a/lib/queries.js +++ b/lib/queries.js @@ -298,7 +298,7 @@ export async function savePageView(website_id, session_id, url, referrer) { website_id, session_id, url: url?.substr(0, URL_LENGTH), - referrer: referrer?.substr(0, URL_LENGTH), + referrer: referrer ? referrer.substr(0, URL_LENGTH) : 'Direct / None', }, }), );