Nickelled lets you listen for events in your guides which run on your site.
If you are using V2 Launchers (standard since 2020)
Attaching the callbacks
Attach callbacks 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
onGuideShow
onGuideClosed
onGuideCompleted
If you are using V1 Mission Dock Launchers
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
}