Description Usage Arguments Value See Also Examples
sessionise
takes a data.frame of events
(including timestamps and user IDs) and sessionises them,
returning the same data.frame but with two additional columns -
one containing a unique session ID, and one the time difference between
successive events in the same session.
1 | sessionise(x, timestamp, user_id, threshold = 3600)
|
x |
a data.frame of events. |
timestamp |
the name of the column of |
user_id |
the name of the column of |
threshold |
the number of seconds to use as the intertime threshold - the time that can elapse between two events before the second is considered part of a new session. Set to 3600 (one hour) by default. |
x
, ordered by userID and timestamp, with two new columns -
session_id
(containing a unique ID for the session a row is in)
and delta
(containing the time elapsed between that row's event,
and the previous event, if they were both in the same session).
bounce_rate
, time_on_page
,
session_length
and session_count
- common metrics
that can be calculated with a sessionised dataset.
1 2 3 4 5 6 7 8 | # Take a dataset with URLs and similar metadata and sessionise it -
# retaining that metadata
data("session_dataset")
sessionised_data <- sessionise(x = session_dataset,
timestamp = timestamp,
user_id = uuid,
threshold = 1800)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.