Skip to content

Commit

Permalink
add viewId to Tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhong32 committed Mar 19, 2024
1 parent 55d8db2 commit 66c0eee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,11 @@ class Tracker {
this.__period = period;
this.__userId = userId;
this.__slide = slide;
this.__viewId = this.generateViewId();
}

generateViewId() {
return crypto.randomUUID();
}
start() {
if (!this.__time) {
Expand All @@ -1035,6 +1040,7 @@ class Tracker {
);

this.__camic.store.addLog({
viewId: this.__viewId,
slide: this.__slide,
user: this.__userId,
x: Math.round(x),
Expand Down

0 comments on commit 66c0eee

Please sign in to comment.