Namespace: Insights

Insights

Methods


<static> self.click(item, data)

Send a click event.
Parameters:
Name Type Description
item
data

<static> self.emit(eventType, arguments)

Emit an event to Insights.
Parameters:
Name Type Description
eventType The type of event to emit.
arguments Additional arguments to send with the event.

<static> self.emitterForField(item, data, emitFunction)

Get an Insights emitter for a field
Parameters:
Name Type Description
item The field item to retrieve the emitter for.
data The data context of the item.
emitFunction function The callback function the emitter is provided to.

<static> self.emitterForSection(item, emitFunction)

Get an Insights emitter for a page, modal or dialog.
Parameters:
Name Type Description
item The section item to retrieve the emitter for. Must be a modal page or dialog.
emitFunction function The callback function the emitter is provided to.

<static> self.fieldHelp(item, data)

Send a field help event.
Parameters:
Name Type Description
item
data

<static> self.fieldNavigation(item, data)

Send a field navigation event.
Parameters:
Name Type Description
item
data

<static> self.milestone(subType)

Send a milestone event.
Parameters:
Name Type Description
subType

<static> self.navigation(page)

Send a navigation event.
Parameters:
Name Type Description
page

<static> self.sectionCompletion(page)

Send a section completion event.
Parameters:
Name Type Description
page
Deprecated:
  • Use sectionExit instead

<static> self.sectionExit(page)

Send an exit event for a page
Parameters:
Name Type Description
page

<static> self.segment(name, value)

Send a segment event.
Parameters:
Name Type Description
name
value
Example

Create a segment in Journey Analytics.

Insights.segment("Age", "18-25");

<static> self.validation(errorInfos, trigger)

Send a validation event.
Parameters:
Name Type Description
errorInfos
trigger