0.0.20 • Published 4 years ago
vikatan_recommendation_widget v0.0.20
vikatan_recommendation_widget
Steps to install the widget in your app:-
- Go to your project directory in terminal.
- Run the following command :
npm i vikatan_recommendation_widget
Steps to use the widget:-
- Go to the file where the widget is required.
- Import the widget using the following piece of code :
import { recommendationsWidget } from 'vikatan_recommendation_widget';
- Call the "recommendationsWidget" with all the parameters mentioned below in the Sample Code Description.
Sample code:
1. <div className="wru_recommendations--gridView">
2. {
3. recommendationsWidget(
4. {
5. recommendation: "article",
6. heading: "Recommended for you",
7. userId: "xxxxx-xxxxx",
8. merchantId: "123456",
9. articleId: "xxxxx-xxxxx"
10. },
11. "wru_recommendations--gridView",
12. "gridView"
13. )
14. }
15. </div>
Sample Code Description:
- Line 1 - It's the div where the widget is to be appended.
- Line 3 -> Line 13 - It's the function that needs to be called for appending the widget.
- Line 5 -> Line 9 - These are the parameters that are required for the api call.
- recommendatiion : It's the type of recommendation, i.e., article or user, etc.
- heading : It's the heading you want on the top of the widget.
- userId : It's users id who is browsing the content.
- merchantId : It's the id of the organization using our widget.
- articleId : It's required for the article based recommendation.
- Line 11 - This is the class name where the widget is to be appended.
- Line 12 - This is the orientation of the widget. (Should be "gridView")
Note ---> Classname of the div where the widget is to be appended(In this case it's Line - 1) should be wru_recommendations--gridView and should be same as mentioned inside the function(In this case it's Line - 11.)
0.0.20
4 years ago
0.0.19
4 years ago
0.0.18
4 years ago
0.0.17
4 years ago
0.0.16
4 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.12
4 years ago
0.0.13
4 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago