To integrate Points System into React Native, you need to make sure that the basic integration of the Nudge Core SDK is done, if you have not already done it, check here.
Our Point System SDK is hosted privately, please connect with your Nudge Account Manager to get demo and production instructions and access to the SDK
var pointSystem = new PointSystem();
Once you have integrated the Nudge Core SDK, just add the above-defined variable to the list in theplugins
property of NudgeProvider
<NudgeProvider
app={nudge}
plugins={[
pointSystem,
]}>
..
..
..
</NudgeProvider>
That's it!
Our Nudge Core would now trigger the Point System defined on your Dashboard using the pointSystem
plugin.
Add-on Integrations
Callback Function
The GetTaskCompleteCallBack
, GetTierCompleteCallBack
functions from the Nudge class enables you to set up a callback mechanism to receive notifications from any screen within the Nudge package. This feature proves particularly useful when handling specific actions or events, such as a Call-to-Action (CTA) callback following the completion of a task and tier, which includes a URL link to redirect the user to a desired location.
Example:
printCallback(response) {
console.log(response);
}
pointSystem.GetTaskCompleteCallBack(printCallback);
pointSystem.GetTierCompleteCallBack(printCallback);