Assuming you have already integrated the Scrimmage Rewards Widget into your web application, you can listen to
events emitted by the widget.

<script>
  window.addEventListener('message', (event) => {
    if (event.data.source === 'Scrimmage') {
      const { type, payload } = event.data;
      switch (type) {
        case 'ready':
          // Widget is ready to be used.
          break;
        case 'redirect':
          const { redirect, parameters } = payload;
          // Handle redirect event.
          break;
      }
    }
  });
</script>

Check out the Widget Events API for more information.