Nickelled lets you listen for events in your guides and mission docks which run on your site. 

Attaching the callbacks

There are two ways you can attach your callbacks – either on the settings object:


    window.NickelledSettings = {
      userId: 123,
      ...
      onGuideShow: function(guideDetails) {
        console.log('Guide show has been triggered!');
        console.log( guideDetails );
        // Whatever you want to do when a guide is shown
      },
    };

Or you can attach it directly on the MissionLauncher object

window.NickelledLaunchers.onGuideShow = function(guideDetails) {
   // Whatever you want to do when a guide is shown
}

The callbacks that you can attach

The Mission Dock

  • onMissionDockShow
  • onMissionDockClosed
  • onMissionDockCompleted

When the callback is triggered additional information will be passed to the function:

{
        missionDockId: MissionDock.id,
        name: MissionDock.name,
        guideCount: MissionDock.guides.length,
        userId: settings.userId
}

Mission Launchers and Launch buttons

  • onGuideShow
  • onGuideClosed
  • onGuideCompleted
{
    guide: url,
    userId: settings.userId,
    inApp: true/false
}
Did this answer your question?