API Reference

Scratch Cards

To integrate Nudges from Nudge into Web, you need to make sure that the basic integration of the nudge_core_browser SDK is done, if you have not already done it, check here.

Import the NudgeScratchcardUi module from nudge_core_browser

import { NudgeScratchcardUi } from 'nudge_core_browser';

Initialize the NudgeScratchcardUi class

 var scratchCard = new NudgeScratchcardUi();
  • Just add the above-defined variable to the list in the plugins property of NudgeProvider
new NudgeProvider({nudgeInstance: nudge, plugins: [scratchCard]});
  • nudge_core_browser would now trigger Scratch Cards defined on your Dashboard using the NudgeScratchcardUi plugin.