From c871759fc183a3c5975c45bd9ce31124ed6c5c1f Mon Sep 17 00:00:00 2001 From: hq1 Date: Mon, 1 Jul 2024 12:39:55 +0200 Subject: [PATCH] Bugfix: opening details UTM sources modal (#4295) --- assets/js/dashboard/util/url.js | 2 +- priv/repo/seeds.exs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/dashboard/util/url.js b/assets/js/dashboard/util/url.js index 609f11612374..f201c6fe0b22 100644 --- a/assets/js/dashboard/util/url.js +++ b/assets/js/dashboard/util/url.js @@ -5,7 +5,7 @@ export function apiPath(site, path = '') { } export function sitePath(path = '') { - return `/${path}` + window.location.search + return (path.startsWith('/') ? path : '/' + path) + window.location.search } export function setQuery(key, value) { diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 4d2dc4c99f20..44e1db967060 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -168,6 +168,7 @@ native_stats_range screen_size: Enum.random(["Mobile", "Tablet", "Desktop", "Laptop"]), operating_system: Enum.random(["Windows", "Mac", "Linux"]), operating_system_version: to_string(Enum.random(0..15)), + utm_campaign: Enum.random(["", "Referral", "Advertisement", "Email"]), pathname: Enum.random([ "/",