onCustomEvent

The onCustomEvent method collects data when a developer-defined event of interest occurs.