Installation
A guide to install Nudge in your web application.
Installing the package
Start by installing the nudge_core_browser_v2
SDK in your web application
npm install nudge_core_browser_v2
You can find the latest versions of the SDK here
Importing the package
Import Nudge
from nudge_core_browser_v2
package into your JS/TS file:
import { Nudge } from 'nudge_core_browser_v2';
Initialization
Create an instance of the Nudge
class with your desired variable name at the root of your application.
You need to pass the apiKey
in your instance (Your Public API key that can be obtained from your dashboard)
const nudge = new Nudge({ apiKey: <YOUR_PUBLIC_API_KEY>});
See how to find your Public API key here.
Example
import {Nudge} from 'nudge_core_browser_v2'
export default function App() {
const nudge = new Nudge({
apiKey:"API_KEY",
region:"in" //or "us"
});
return ()
}