Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Bugfix: opening details UTM sources modal (#4295)

hq1c871759fc183
diff --git a/assets/js/dashboard/util/url.js b/assets/js/dashboard/util/url.js
index 609f116123..f201c6fe0b 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 4d2dc4c99f..44e1db9670 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([
"/",