Open eroux opened 7 months ago
just found this library: https://getanalytics.io/ it can trigger events from code:
/* Track a custom event */
analytics.track('userPurchase', {
price: 20
item: 'pink socks'
})
which can be forwarded to any dedicated backend (including existing ones, see https://getanalytics.io/plugins/)
I think this is pretty good! We can start the integration in the client code, I'm just not quite sure what backend to use yet... maybe we'll just dump the logs like we do for client errors
seems pretty straightforward to track page location changes/page loaded events and log everything in the client errors log file: https://library-dev.bdrc.io/show/bdr:W3CN3215?s=%2Fshow%2Fbdr%3AMW3CN3215
(just have to filter the ones having "message":"analytics"
)
[2024-04-09T15:29:23.070Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"new location","properties":{"previousLocation":"/show/bdr:PR0LULDC001","newLocation":"/search?q=\"dri med 'od zer/\"~1&lg=bo-x-ewts&t=Person"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"98a3a239-2c13-44e6-b26c-0dd070c4a03e","ts":1712676562583,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/search?q=%22dri%20med%20%27od%20zer/%22~1&lg=bo-x-ewts&t=Person","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:29:26.314Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"page loaded","properties":{"target":"\"dri med 'od zer/\"~1"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"d54b9bd5-b74a-4209-88a0-172880d24449","ts":1712676566043,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/search?q=%22dri%20med%20%27od%20zer/%22~1&lg=bo-x-ewts&t=Person","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:29:43.703Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"new location","properties":{"previousLocation":"/search?q=\"dri med 'od zer/\"~1&lg=bo-x-ewts&t=Person","newLocation":"/show/bdr:P3CN8472?s=q%3D%2522dri%2520med%2520%2527od%2520zer%2F%2522~1%26lg%3Dbo-x-ewts%26t%3DPerson%26n%3D5"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"07b3063d-59ab-4aef-884f-8c3819842647","ts":1712676583477,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:P3CN8472?s=q%3D%2522dri%2520med%2520%2527od%2520zer%2F%2522~1%26lg%3Dbo-x-ewts%26t%3DPerson%26n%3D5","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:29:44.024Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"page loaded","properties":{"target":"assocTypes"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"8308b3cc-6119-4516-ae65-ca12a3b2f5ee","ts":1712676583837,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:P3CN8472?s=q%3D%2522dri%2520med%2520%2527od%2520zer%2F%2522~1%26lg%3Dbo-x-ewts%26t%3DPerson%26n%3D5","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:29:50.572Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"new location","properties":{"previousLocation":"/show/bdr:P3CN8472?s=q%3D%2522dri%2520med%2520%2527od%2520zer%2F%2522~1%26lg%3Dbo-x-ewts%26t%3DPerson%26n%3D5","newLocation":"/search?r=bdr:P3CN8472&t=Work"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"a9433fa4-8754-4b43-84e4-29265e991447","ts":1712676590328,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/search?r=bdr:P3CN8472&t=Work","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:29:51.097Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"page loaded","properties":{"target":"bdr:P3CN8472"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"05bf67b5-cfec-49ba-bd4a-d63b22833d4d","ts":1712676590865,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/search?r=bdr:P3CN8472&t=Work","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:29:56.626Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"new location","properties":{"previousLocation":"/search?r=bdr:P3CN8472&t=Work","newLocation":"/show/bdr:WA3CN3215?s=r%3Dbdr%3AP3CN8472%26t%3DWork%26n%3D2"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"09503a47-6fc0-4dcc-8c23-3f7992b659a7","ts":1712676596297,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:WA3CN3215?s=r%3Dbdr%3AP3CN8472%26t%3DWork%26n%3D2","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:29:56.713Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"page loaded","properties":{"target":"assocTypes"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"6c541ee9-cd05-4975-ac3d-3843de0772b7","ts":1712676596466,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:WA3CN3215?s=r%3Dbdr%3AP3CN8472%26t%3DWork%26n%3D2","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:30:01.015Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"new location","properties":{"previousLocation":"/show/bdr:WA3CN3215?s=r%3Dbdr%3AP3CN8472%26t%3DWork%26n%3D2","newLocation":"/show/bdr:MW3CN3215"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"4d17e1a1-d9b2-4d4f-9371-de5bcc61a2cc","ts":1712676600752,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:MW3CN3215","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:30:01.302Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"page loaded","properties":{"target":"bdr:MW3CN3215"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"ced2b1cb-2a3d-4b42-ba18-d434db88beea","ts":1712676601069,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:MW3CN3215","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:30:03.667Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"new location","properties":{"previousLocation":"/show/bdr:MW3CN3215","newLocation":"/show/bdr:W3CN3215?s=%2Fshow%2Fbdr%3AMW3CN3215#open-viewer"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"d1d4fd52-232d-4b1f-9cff-53a8d26c5e75","ts":1712676603421,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W3CN3215?s=%2Fshow%2Fbdr%3AMW3CN3215#open-viewer","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-09T15:30:10.946Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"new location","properties":{"previousLocation":"/show/bdr:W3CN3215?s=%2Fshow%2Fbdr%3AMW3CN3215#open-viewer","newLocation":"/show/bdr:W3CN3215?s=%2Fshow%2Fbdr%3AMW3CN3215"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"05ab9646-eae2-4f56-9456-00fd7c7dde66","ts":1712676610714,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W3CN3215?s=%2Fshow%2Fbdr%3AMW3CN3215","version":"\"7ee13e8a-f136-4cdf-a9f4-12ae6c5e7a53\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
which already contains everything to handle this:
user searched string "s"@bo then clicked on result bdr:XXX which is in position n in the search results
as "newLocation":"/show/bdr:P3CN8472?s=q%3D%2522dri%2520med%2520%2527od%2520zer%2F%2522~1%26lg%3Dbo-x-ewts%26t%3DPerson%26n%3D5"
which decodes as q="dri med 'od zer/"~1&lg=bo-x-ewts&t=Person&n=5
has n
(position in results) parameter encoded inside the s
parameter, and "previousLocation":"/search?q=\"dri med 'od zer/\"~1&lg=bo-x-ewts&t=Person"
obviously contains the search terms
oh and we shouldn't be too far from this one as well:
user spent n seconds on record bdr:XXX and clicked on n links
using time stamps and "previousLocation":"/show/bdr:WA3CN3215(...)","newLocation":"/show/bdr:MW3CN3215"
yet I'm not sure how to handle this because you can't both stay on a resource and click on a link (so unless you use a method like above you always get at most one link clicked per visit on a page)
oh that's nice! maybe at some point we'll want to have it a bit normalized like
{..., "rid": "bdr:WA3CN3215", "pos-in-results": 5, "search-query": {"q": "\"dri med 'od zer/\"~1", "lg": "bo-x-ewts", "t": "Person"}, ... }
but it's not particularly urgent. I think the best will be for now that I create an endpoint on editserv similar to log_error
, that would be just log_general
. Note that maybe this should happen in a dedicated branch as we probably will want it to reach main
before the rest of the newUX
branch so that we can start gather data
we now can trigger an event when an etext page stays more than 5s on screen before scrolling out:
[2024-04-11T16:13:39.748Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"read page","properties":{"id":"IE0OPI1B38BB41","key":"/show/bdr:IE0OPI1B38BB41?startChar=565#open-viewer"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"7b494b28-e0ad-4b2c-b33b-aedbca614734","ts":1712852019601,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:IE0OPI1B38BB41","version":"\"4247e70f-f8fb-43c5-a412-ee3f8c178de0\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
not sure what you meant by user spent n seconds in the content viewer (image or etext viewer) for bdr:XXX, and spent more than 5 seconds on n pages though is that the number of pages that where read in an etext/scans which was open more than 5 sec?
ah sorry yes, there are two different n
s :) What I meant is probably two distinct things:
user spent more than 5s on n pages of bdr:XXX
user spent n seconds in the viewer bdr:XXX
(only record when n > min
, where min
is around 30s) but maybe it's a bit too precise actually, if it's complicated then only the second one is enough
ok thanks! so we have that kind of tracking now, viewer total pages
is triggered when a page is scrolled out of the screen after having been visible more than 5sec, and viewer total time
when total time spent exceeds 30sec:
[2024-04-12T09:35:27.600Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"IE0OPI1B38BB41","pages":1},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"6e70ee45-a239-4575-bfb2-9110ec570db5","ts":1712914527458,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:IE0OPI1B38BB41","version":"\"b504219d-2308-44eb-bdd5-76466da6cfeb\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T09:35:28.215Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"IE0OPI1B38BB41","pages":2},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"9898d74a-de34-4100-8e5b-d92448a6625b","ts":1712914528075,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:IE0OPI1B38BB41","version":"\"b504219d-2308-44eb-bdd5-76466da6cfeb\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T09:35:47.019Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total time","properties":{"id":"IE0OPI1B38BB41","time":45.821},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"aea9d73d-5fb4-41a6-865f-6b3cb8dbdb3b","ts":1712914546793,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:IE0OPI1B38BB41","version":"\"b504219d-2308-44eb-bdd5-76466da6cfeb\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T09:35:47.029Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"IE0OPI1B38BB41","pages":3},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"f30d4f18-0493-4992-be6e-ae30e406c2ae","ts":1712914546794,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:IE0OPI1B38BB41","version":"\"b504219d-2308-44eb-bdd5-76466da6cfeb\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T09:36:02.763Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"IE0OPI1B38BB41","pages":4},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"4253bb91-78b6-4ee3-a085-a330fbb9a03f","ts":1712914562608,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:IE0OPI1B38BB41","version":"\"b504219d-2308-44eb-bdd5-76466da6cfeb\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T09:36:11.524Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"IE0OPI1B38BB41","pages":5},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"0cc68309-55c1-45ac-a5e3-3051267f600d","ts":1712914571374,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:IE0OPI1B38BB41","version":"\"b504219d-2308-44eb-bdd5-76466da6cfeb\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
oh but do we need the exact UT
volume id as well or the "global" etext IE
id is enough?
now works from mirador as well: https://library-dev.bdrc.io/show/bdr:W1AC16#open-viewer
[2024-04-12T14:34:00.419Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"page loaded","properties":{"target":"https://iiifpres.bdrc.io/vo:bdr:I2PD18488/manifest"},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"abf10a6a-cd77-452b-b56a-fffeb00890ed","ts":1712932440227,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W1AC16?s=%2Fshow%2Fbdr%3AMW1AC16#open-viewer","version":"\"9c5d0aa2-f4b4-42b2-b07a-4c6dec83bfec\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T14:34:24.164Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"I2PD18488","pages":1},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"7460ced2-2167-4ad3-841f-d0ab344b29d9","ts":1712932464016,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W1AC16?s=%2Fshow%2Fbdr%3AMW1AC16#open-viewer","version":"\"9c5d0aa2-f4b4-42b2-b07a-4c6dec83bfec\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T14:34:52.474Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total time","properties":{"id":"I2PD18488","time":52.198},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"a8d95ada-a9ea-4cf0-9944-b33c5ebbbf60","ts":1712932492248,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W1AC16?s=%2Fshow%2Fbdr%3AMW1AC16#open-viewer","version":"\"9c5d0aa2-f4b4-42b2-b07a-4c6dec83bfec\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-12T14:34:52.475Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"I2PD18488","pages":2},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"82eba2d8-4ba4-4094-a1a4-553e1c28e07e","ts":1712932492248,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W1AC16?s=%2Fshow%2Fbdr%3AMW1AC16#open-viewer","version":"\"9c5d0aa2-f4b4-42b2-b07a-4c6dec83bfec\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
that looks pretty good, thanks! Would it be possible to send the data for a volume only when the user exits the viewer (or closes the page altogether?)
should be ok now, only sending viewer total pages
and viewer total time
when going back to the volume selector or closing the tab/mirador/etext viewer or going somewhere else using a link: https://library-dev.bdrc.io/show/bdr:W2PD19078?s=%2Fshow%2Fbdr%3AMW2PD19078#open-viewer
[2024-04-30T16:18:22.662Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total pages","properties":{"id":"I2PD19082","pages":3},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"b5124981-b8a7-4663-abe3-ec1e0246645e","ts":1714493902514,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W2PD19078?s=%2Fshow%2Fbdr%3AMW2PD19078#open-viewer","version":"\"8628fdee-413c-4b40-b0c7-694dc3f9a97b\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[2024-04-30T16:18:22.662Z] -- 91.160.61.241 -- {"payload":{"type":"track","event":"viewer total time","properties":{"id":"I2PD19082","time":47.333999999999996},"options":{},"userId":null,"anonymousId":"799f1cb4-ab1f-4453-b2d1-7e924e421276","meta":{"rid":"d3743efd-bf8b-4253-8fd5-a270c415ea81","ts":1714493902515,"hasCallback":true}},"message":"analytics","location":"https://library-dev.bdrc.io/show/bdr:W2PD19078?s=%2Fshow%2Fbdr%3AMW2PD19078#open-viewer","version":"\"8628fdee-413c-4b40-b0c7-694dc3f9a97b\"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"}
[edit: oh it should handle time spent in page view/OSD as well]
beautiful, thanks a lot!
we need to start recording new metrics to have finer popularity scores. These metrics are the following:
"s"@bo
then clicked on resultbdr:XXX
which is in positionn
in the search resultsn
seconds on recordbdr:XXX
and clicked onn
linksn
seconds in the content viewer (image or etext viewer) forbdr:XXX
, and spent more than 5 seconds onn
pagesNow, technically I'm not quite sure yet how to do that to be honest... @berger-n once you're done with #859 can you make a proposal for this? we can create a new API on the server to collect these but I'm not quite sure what it would look like yet