When using our embeds, Shoprocket automatically triggers events when users take actions within your store. You can listen for these events in your own website/application and create custom behaviours or setup tracking for logs and marketing performance purposes.
Before trying to register a listener to a Shoprocket event, you should wait for Shoprocket to be ready, you can do this like so:
Wait for Shoprocket to be ready
The full list of Shoprocket events available:
In this example, we are simply logging the event response to console so that you can see what data is returned