JavaScript Functions

Know how you can create a CTA (Call-to-action) button for your website to guide users towards your goal conversion.

The prerequisite for using any of the JS functions is that the basic integration and authentication JS should be enabled on the page. Only after that JS executes on the page, the JS functions library becomes available. CTA (Call-to-action) functions, User details JS, HTML wrappers for JS functions.

The following CTA functionality is available with us:

- zrl_mi.show_dashboard('show_<activity_id>')
- zrl_mi.show_dashboard('show_<redemption_id>')
- zrl_mi.show_dashboard('show-earn-tab')
- zrl_mi.show_dashboard('show-redeem-tab')
- zrl_mi.show_raf_popup()

CTA Functionality

zrl_mi.show_dashboard('show_<activity_id>')  

To replace "activity_id" with the actual activity ID, follow the given example:

For instance:

zrl_mi.show_dashboard('show_<write_a_review>')

You can obtain the activity ID from Activities>> Settings in the Admin Console.

JavaScript Functions

This function will bring up the specific activity. All you have to do is to add activity id in the code.

birthday bonus
zrl_mi.show_dashboard('show_<redemption_id>')  

To replace "redemption_id" with the actual redemption ID, follow the given example:

For instance:

zrl_mi.show_dashboard('show_<reward_a1e91>')  

You can obtain the redemption ID from Rewards>> Settings in the Admin Console.

redemption ID

This function will bring up a specific reward. All you have to do is to add redemption id in the code.

JavaScript Functions
zrl_mi.show_dashboard('show-earn-tab')

This function will bring up the earn points dashboard.

earn point dashboard
zrl_mi.show_dashboard('show-redeem-tab')

This function will bring up my reward dashboard.

redeem dashboard
zrl_mi.show_raf_popup()  

This function will bring up the referral popup.

referral popup

Embedded UI Element

We also provide embedded UI elements, which can be used as html to bring up various screens within the website.

embedded UI element

Embed Link To Loyalty Dashboard

Embed links to any part of the loyalty dashboard within your website pages. When members click on the link, the loyalty dashboard will be rendered as a pop-up on the page. You can provide links to enable members to directly access a specific part of the dashboard like the earning opportunities or the rewards tab.

embed link

Embed Member's Points Data

Any element on the page with this attribute will have its text set to the current member’s points data.

embed member point data

Embed Member's Tier

Any element on the page with this attribute will have its text set to the current member’s tier.

embed membet tier

Embed Member's Referral Link

Embed member's unique referral link in your web pages to promote the referral program.

embed member referral link

Embed Earning Potential On Product Pages

Any element on the product page with this attribute will have its text set to the number of points the member will receive for purchasing the particular product. The number of points the member will earn are calculated based on the product price and the configuration settings of the 'Purchase on Website' activity.

Embed Earning Potential On Product Pages