Product Updates

Trigger Earn Rule Modals Through Custom Events

October 16, 2023

Introducing a new update that allows you to open an earn rule modal using a simple code snippet.

Now, when users click on an action within your website, even if it's distant from the main loyalty widget, a pop-up will appear to display the relevant earn rule associated with the specific ID.

Here is the Code Snippet:

window.dispatchEvent(new CustomEvent("influenceio:openWidget", { detail: { itemId: "EARN_RULE_ID" } }));