Skip to main content

Integration steps

1

Integrate SuprSendProvider

Integrate SuprSendProvider as it is needed for creating SuprSend Client and authenticating user.
2

Accessing preferences methods using useSuprSendClient hook

Call useSuprSendClient hook in your react component code to get SuprSend client instance which has all preferences methods.
3

Integrating Preferences

Please refer these sections to understand and implement preferences methods in your react application, as integration steps are same for both the web-sdk and react-sdk.Note: To get translated category names and descriptions, pass locale in the getPreferences arguments (e.g. getPreferences({ locale: 'fr' })). The web SDK sends this locale to the preferences API; if it is not passed (or the locale is unsupported), no translation is applied and category names and descriptions are returned as configured in the dashboard.

Example