Skip to main content

userViewedPanel

Description

Observable field that emits the panel name when a panel is opened by the user.

Type

assocArray

Usage

m.lib.observeField("userViewedPanel", "onUserViewedPanel")

function onUserViewedPanel(event as Object)
panelData = event.getData()
print "User viewed panel: " + panelData.panelName
end function

Data Structure

The emitted data includes:

FieldTypeDescription
panelNamestringName of the panel that opened

Example

sub setupPanelObservers()
m.lib.observeField("userViewedPanel", "onUserViewedPanel")
end sub

function onUserViewedPanel(event as Object)
panelData = event.getData()

if panelData <> invalid and panelData.panelName <> invalid then
print "User opened: " + panelData.panelName

' Track analytics
trackPanelView(panelData.panelName)
end if
end function

Best Practices

  • Use this field to track panel view analytics
  • Monitor which panels users engage with most
  • Trigger application-specific logic based on panel views