Show Developer Menu

Advanced Usage

Manually Displaying a Cue

You can manually display a cue to the user via a simple Reamaze.js API call. This is useful if the rules that are provided are not suitable or if you want to control when and how the Cue is shown to the user.

<script type="text/javascript">
  Reamaze.cue({
    id: "cart-checkout-sale",
    name: "Cart Checkout Sale",
    message: "Hey there, we noticed you have some items in your cart.\n\nOur Spring Sale ends soon, so hurry and check out now and get 40% off your order 😃",
    user: {
      type: "team"
    },
    buttons: [
      {
        text: "Checkout",
        url: "https://www.daffywidgets.com/checkout",
      },
    ],
    renew: true,
    onClickScript: "alert('Cue clicked')",
    sound: false,
  });
</script>

Aside from the normal parameters for a Cue, there are some additional ones like renew and onClickScript that you can use to further customize your Cue.

Parameter Description
renew By default, each Cue will only show once per ID for a user. If set to true, this Cue will show regardless of whether a Cue of the same ID has been shown before.
onClickScript By default, clicking on a Cue opens up the Shoutbox where the user can send you a message or contact you regarding the Cue. You can override the default click behavior of by providing a script to the onClick parameter.
sound Defaults to true. You can turn off the sound that is played when the Cue is shown by setting this to false.

Next Step

Now that we've covered all of the available UI elements, we'll discuss how you can tie in your site's authentication and login system to make Reamaze even smarter.

Next: Auth & SSO →