diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 612dde53f..bc71735c8 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -31,7 +31,14 @@ Enum.flat_map(-720..0, fn day_index -> attrs = [ domain: site.domain, hostname: site.domain, - timestamp: fn -> put_random_time.(date) end + timestamp: fn -> put_random_time.(date) end, + referrer_source: fn -> Enum.random(["", "Facebook", "Twitter", "DuckDuckGo", "Google"]) end, + browser: fn -> Enum.random(["Edge", "Chrome", "Safari", "Firefox", "Vivaldi"]) end, + browser_version: fn -> 0..50 |> Enum.random() |> to_string() end, + country_code: fn -> Enum.random(["ZZ", "BR", "EE", "US", "DE", "PL", ""]) end, + screen_size: fn -> Enum.random(["Mobile", "Tablet", "Desktop", "Laptop"]) end, + operating_system: fn -> Enum.random(["Windows", "macOS", "Linux"]) end, + operating_system_version: fn -> 0..15 |> Enum.random() |> to_string() end ] Plausible.Factory.build_list(number_of_events, :pageview, attrs)