openWidget
Opens the floating Loyalty widget on the frontend. This function accepts an optional object as a parameter which can be used to open a specific section of the widget.
RivoJS.openWidget();
Usage
Call this function when you want to programmatically open the Loyalty App widget. For example, you may want to open the widget in response to a specific user action or event.
Parameters
The openWidget function accepts an optional object with the following structure:
{
page: 'section_name'
}
where section_name
is one of the following:
Value | Description |
---|---|
index | Opens the front page 'Home' section of the floating |
ways_to_earn | Opens the 'Ways to Earn' section of the floating widget |
ways_to_redeem | Opens the 'Ways to Redeem' section of the floating widget |
my_rewards | Opens the 'My Rewards' section of the floating widget |
referrals | Opens the 'Referrals' section of the floating widget |
my_referrals | Opens the 'My Referrals' section of the floating widget |
Example
RivoJS.openWidget({page: 'ways_to_earn'});
Updated over 1 year ago