Skip to content

Commit

Permalink
also use Date.now() in index
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-astra-via committed Jun 19, 2024
1 parent c55bf74 commit 7bf442f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default async function (manager: Manager, settings: ComponentSettings) {
sendUserEngagementEvent(event, settings, manager)
}
// engagement start gets reset on every new pageview or event
const now = new Date(Date.now()).getTime()
const now = Date.now()
event.client.set('engagementStart', `${now}`)
// Reset engagementDuration after pageview has been dispatched so it restarts the count
event.client.set('engagementDuration', '0')
Expand Down

0 comments on commit 7bf442f

Please sign in to comment.