powered by
add_session() groups visits into "sessions", defining a session to end when the difference between two consecutive timestamps exceeds a cutoff.
add_session()
cutoff
add_session(wt, cutoff)
webtrack data.table (ordered by panelist_id and timestamp) with the same columns as wt and a new column called session.
session
webtrack data object.
numeric (seconds). If the difference between two consecutive timestamps exceeds this value, a new browsing session is defined.
if (FALSE) { data("testdt_tracking") wt <- as.wt_dt(testdt_tracking) # Setting cutoff to 30 minutes wt <- add_session(wt, cutoff = 1800) }
Run the code above in your browser using DataLab