JavaScript Functions

Know how you can create CTA 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 functions, User details JS, HTML wrappers for JS functions.

The following CTA functionality is available with us:

  • zrlmi.show_dashboard('show<activity_id>')
  • zrlmi.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

zrlmi.show_dashboard('show<activity_id>')
This function will bring up the specific activity. All you have to do is to add activity id in the code.

For example: zrlmi.show_dashboard('show<birthday_bonus>')

JavaScript FunctionsJavaScript Functions

zrlmi.show_dashboard('show<redemption_id>')
This function will bring up a specific reward. All you have to do is to add redemption id in the code.

For example: zrlmi.show_dashboard('show')

JavaScript FunctionsJavaScript Functions

zrl_mi.show_dashboard('show-earn-tab')
This function will bring up the earn points dashboard.

JavaScript FunctionsJavaScript Functions

zrl_mi.show_dashboard('show-redeem-tab')
This function will bring up my reward dashboard.

JavaScript FunctionsJavaScript Functions

zrl_mi.show_raf_popup()
This function will bring up the referral popup.

JavaScript FunctionsJavaScript Functions

Embedded UI Element

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

JavaScript FunctionsJavaScript Functions

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.

JavaScript FunctionsJavaScript Functions

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.

JavaScript FunctionsJavaScript Functions

Embed Member's Tier

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

JavaScript FunctionsJavaScript Functions

Embed Member's Referral Link

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

JavaScript FunctionsJavaScript Functions

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.

JavaScript FunctionsJavaScript Functions