jeudi 21 janvier 2021

Page session in Node.js

I want to track page sessions. That means a unique session which is created for one user landing on one single endpoint, so revisiting the same endpoint in a window of time always happens in the same session.

I can establish an ordinary session (that uses client cookies and lives as long as one user is surfing under the top-domain) and couple it with endpoints then server cache the couple (session_id, endpoint). It is not hard to achieve but I don't want to reinvent the wheel here if a better work has already been done.

I have no starting point (Node.js code) to begin with, except the previous idea.

ps: I am trying to achieve this to be able to log unique users landing on any page of my website to keep track of this.




Aucun commentaire:

Enregistrer un commentaire