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', }, }), );