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:

ValueDescription
indexOpens the front page 'Home' section of the floating
ways_to_earnOpens the 'Ways to Earn' section of the floating widget
ways_to_redeemOpens the 'Ways to Redeem' section of the floating widget
my_rewardsOpens the 'My Rewards' section of the floating widget
referralsOpens the 'Referrals' section of the floating widget
my_referralsOpens the 'My Referrals' section of the floating widget

Example

RivoJS.openWidget({page: 'ways_to_earn'});