Event Types

List of built-in event types and how each is defined.

Category Event Definition

Mouse

click

A pointing device button is pressed and released on an element.

mouseover

A pointing device is moved onto the element that has the listener attached or onto one of its children.

Keyboard

keypress

A key is pressed and that key normally produces a character value (use input instead).

Forms

focus

An element received focus (does not bubble).

blur

An element lost focus (does not bubble).

submit

A form is submitted.

change

An element loses focus and its value changed since gaining focus.

HMTL5 Video

ended

Playback stopped because the end of the media was reached.

loadeddata

The first frame of the media finished loading.

play

Playback began.

pause

Playback is paused.

stalled

The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.

volumechange

The volume has changed.

% complete

Emits an event given a specified percentage of total playing time.

For example, entering 10% indicates that this rule fires only when 10% of the total length of the video has been played.

time complete

Emits an event given a specified duration of playing time.

For example, entering 10 indicates that this rule fires only when 10 seconds of the total length of the video has been played.

Mobile

orientationchange

The orientation of the device (portrait/landscape) has changed.

zoomchange

When a pinch or spread gesture is performed on a mobile device.

Browser

tab focus

Event is triggered when the content gains focus.

tab blur

Event is triggered when the content loses focus.

Other

custom

A custom event has been triggered on the DOM.

Select Custom from the Event Type drop-down list, then specify the custom event name.

For more information, see CustomEvent on the Mozilla Developer Network.

enters viewport

When the element first comes into the view of the visitor. If the element is in view immediately upon page load, the rule fires immediately. If the element comes in view after scrolling, the rule fires then.

An optional delay can be specified in the rule that determines how long the element has to be in view for before the event is triggered (the default value is 1 second).

element exists

When an element of a specified selector comes into existence–either because it is in the page markup or dynamically injected later on. Each rule fires only once.

pushState or hashchange

The URL path or the hash (fragment identifier) at the end of the URL changed.

The pushState or hashchange event can be used with Single Page Apps (SPAs) in which a page does not reload but its content changes. Common development frameworks that can be used to create SPAs include Angular and React.

This event type lets you create event-based rules without relying on developers. These rules fire when common functions in SPAs occur, such as:

  • The URL path changed based on use of the HTML5 History pushState API.

    For more information about using pushState, see Adding and Modifying History Entries on the Mozilla Developer Network.

  • The hash changed due to the user changing views or locations on the page.

    For more information about using hashchange, see Hashchange on the Mozilla Developer Network.

time passed

Value in seconds. The event is triggered after the specified number of seconds has passed.

dataelementchanged

A date element changed. This event lets you select a specific data element to use as a trigger.

For more information on a possible use case, see Add Adobe Experience Manager ContextHub Tool.