mirror of
https://github.com/penpot/penpot.git
synced 2025-07-25 22:07:20 +02:00
📎 Add more events instrumentation
This commit is contained in:
parent
bf6211903c
commit
8acc9af1f5
10 changed files with 216 additions and 189 deletions
|
@ -34,6 +34,20 @@
|
|||
(yrq/get-header request "x-real-ip")
|
||||
(yrq/remote-addr request)))
|
||||
|
||||
(defn extract-utm-params
|
||||
"Extracts additional data from params and namespace them under
|
||||
`penpot` ns."
|
||||
[params]
|
||||
(letfn [(process-param [params k v]
|
||||
(let [sk (d/name k)]
|
||||
(cond-> params
|
||||
(str/starts-with? sk "utm_")
|
||||
(assoc (->> sk str/kebab (keyword "penpot")) v)
|
||||
|
||||
(str/starts-with? sk "mtm_")
|
||||
(assoc (->> sk str/kebab (keyword "penpot")) v))))]
|
||||
(reduce-kv process-param {} params)))
|
||||
|
||||
(defn profile->props
|
||||
[profile]
|
||||
(-> profile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue