Skip to content

[amp-analytics] the "visible" and "hidden" triggers are a bit confusing #5934

@lannka

Description

@lannka

By looking at the name, I would think that they're the opposite counterpart to each other. Especially, they share the same VisibilitySpec to select an element and specify the conditions to meet.

However, the "visible" trigger fires when the selected element enters viewport; but the "hidden" trigger fires when user leaves the page (vs selected element leaves viewport).

It will be more self-explained if we rename "hidden" to "pagehidden" (or something similar).

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions