List of requirements
Fully supported on Android Lollipop (API 21) and later.
Fully supported on iOS 14+.
Supported on React Native v0.72.1 and lower.
From the Feedier platform
⚠️ Public API key (Organizations → Integration)
Carrier ID = Survey ID (Sources → Survey → Info)
Note |
---|
Known limitations:
|
SDK performance
Fully cached, all assets loaded from the Feedier API are 100% cached.
Supports localization in 20+ languages from the Feedier Dashboard
Supports all Feedier 16+ question types as well as conditions based on the previous answers and attribute values
Key principles
Info |
---|
The SDK is designed with 3 key principles:
|
How to install the package in your app?
Run
npm i feedier-widget-react-native
Import the Feedier module in your App
Code Block import FeedierWidgetComponent, { FeedierWidget } from 'feedier-widget-react-native';
Initialize the FeedierWidget in your App’s constructor
Code Block FeedierWidget.init( api_key, carrier_id, attribute_values debug, force, endpoint )
Argument | Type | Description | ||
---|---|---|---|---|
| Required, | Your Feedier Organization’s public key. | ||
| Required, | The Survey ID you are displaying, available from your Feedier Dashboard or with the Feedier REST API. | ||
| Optional, | Object of Attributes for analysis and correlation in Feedier. Example:
| ||
| Optional, | If enabled, the SDK will send in the console all the widget state. This is useful when developping but not recommended on production. | ||
| Optional, | if When completed, the next time the widget will be displayed would be in 30 days. Except if you use the | ||
| Optional, | Buy default, this is the Feedier Production endpoint but ifyou have a Feedier dedicated instance, you want to put your instance’s API endpoint here. Example: |
Open the Widget from any method / hook / class:
Code Block |
---|
FeedierWidget.openWidget() |
Note |
---|
The widget will be automatically closed when the feedback is received. The user will not see the widget again until the expiration time (see |
Other methods
Code Block |
---|
FeedierWidget.closeWidget() |
Example code
Code Block |
---|
// In your App's header import FeedierWidgetComponent, { FeedierWidget } from 'feedier-widget-react-native'; ... // In your App's constructor FeedierWidget.init( 'OwcuoeC6K1lxxxxxxx0YM2i8gOny', 123, attribute_values = { app_version: '1.1211.19', user_type: 'customer', customer_segment: 'A', user_id: 'AJAJKN12NQ', source: 'android', }, false, false ) // Example of method to open the widget const openModal = () => { FeedierWidget.openWidget() } ... // In your App's JSX <FeedierWidgetComponent /> |
Tip |
---|
You have now successfully setup the Feedier React Native SDK. |
Here is an example of the result in Feedier based on the Attribute Values you defined in attribute_values
:
Info |
---|
Any questions, ask our Support team at support@feedier.com Our team can also provide functional application based on the React Native SDK upon request. |