From 9ffb9a7ae75dc92026695de63207abdb14bd0ed3 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Mon, 23 Dec 2024 15:54:09 +0100 Subject: [PATCH] Also check ref not only referrer --- src/routes/+layout.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 3dd7ef339e..513870e8df 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -74,8 +74,8 @@ if (ref || referrer || utmSource || utmCampaign || utmMedium) { createSource(ref, referrer, utmSource, utmCampaign, utmMedium); } - if (referrer) { - sessionStorage.setItem('referrer', referrer); + if (referrer || ref) { + sessionStorage.setItem('referrer', referrer ? referrer : (ref ?? '')); } if (utmSource) { sessionStorage.setItem('utmSource', utmSource);