Commit 5ff8bb31 authored by Mikko Ahlroth's avatar Mikko Ahlroth

Add screen resolution and tz offset

parent ba17fd8c
......@@ -10,8 +10,12 @@ defmodule Tilastokeskus.Reception.Routes.PageView do
addr = get_addr(req)
ua = parse_ua(req)
{referrer, referrer_noq, referrer_domain} = parse_referrer(req)
body = URI.decode_query(req.body || "")
{path, path_noq, host} = parse_url(body)
screen_w = Map.get(body, "screen_width")
screen_h = Map.get(body, "screen_height")
tz_offset = Map.get(body, "tz_offset")
# Run in one transaction to avoid multiple DB checkouts
{:ok, response} =
......@@ -36,7 +40,10 @@ defmodule Tilastokeskus.Reception.Routes.PageView do
ua_version: unknown_2_str(ua.client.version),
os_name: unknown_2_str(ua.os.name),
os_version: unknown_2_str(ua.os.version),
device_type: unknown_2_str(ua.device.type)
device_type: unknown_2_str(ua.device.type),
screen_w: screen_w,
screen_h: screen_h,
tz_offset: tz_offset
}
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment