Pre-requisite:
Ensure the basic integration of the Nudge Core SDK is complete. If not, check here.
Overview
The NudgeStoriesUi
module lets you add interactive stories to your web application. Install this plugin to launch stories from the dashboard and increase user engagement.
Installation
Import the NudgeStoriesUi
module from nudge_core_browser_v2
import { NudgeStoriesUi } from 'nudge_core_browser_v2';
Initialize
Initialize the NudgeStoriesUi
class
var stories = new NudgeStoriesUi();
Pass plugin into the provider
Just add the above-defined variable to the list in the plugins
property of NudgeProvider
new NudgeProvider({nudgeInstance: nudge, plugins: [stories]});
Add Stories div
Now you just need to add a div
where you want your stories to appear and make sure to give it the id of nudge_stories
<div id="nudge_stories">
<div>
That's it
nudge_core_browser_v2
would now trigger Stories defined on your Dashboard using the NudgeStoriesUi
plugin.