-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add time_on_page trigger #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: web/page-triggers-1
Are you sure you want to change the base?
Conversation
Add time_on_page trigger and publish
|
|
📝 Documentation updates detected! Updated existing suggestion: Document new page trigger types for Web Experiment |
| if (page.trigger_type === 'time_on_page') { | ||
| const triggerValue = page.trigger_value as TimeOnPageTriggerValue; | ||
| const durationMs = triggerValue.durationMs; | ||
| const timeoutId = setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It's missing
visibilitychangeevent handler to reset when the user moves away from the current tab - Q: When there are multiple page objects with the time on page trigger type, are there any potential issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- should time on page be cumulative? Or should the trigger be reset to 0 if it has not already fired?
- there should not be issues with this, but deduping of page object-triggered actions will be more formally addressed in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Per tech doc:
The timer resets whenever the user leaves the tab/window and returns
IOW, clear timeout when the current tab is hidden, and restart
Summary
Support
time_on_pagepage trigger, fired when the end user has been on the page for a specifieddurationMs.Checklist