-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
A "hidden" trigger with visibilitySpec will fire when page enters background and meantime all the conditions specified in the visibilitySpec is met.
Despite of the confusion I was complaining about in #5934, I found it's also hard to justify its usefulness given its ambiguity.
It allows you to trigger when page enters into background:
- meantime 50% of the selected element has been visible.
- meantime the selected element has been visible for a total time of 1s.
However, in both cases, a "visible" trigger with same visibilitySpec does pretty much the same thing.
I hear you say: "wait! the difference is the reported maxVisiblePercentage and totalVisibleTime values!". True, but the "hidden" trigger doesn't give you the real value you are thinking of either. That's because "hidden" is when page enters background (tap home button on an iPhone), meaning it can be brought back to foreground again, which could further increase totalVisibleTime and maxVisiblePercentage. And depending on the current user behavior and the spec you configured, the trigger can fire at either the first time it enters background, or the 2nd time, or 3rd time... It's non-deterministic. It's really hard to describe what totalVisibleTime you're collecting here.