Skip to main content
All CollectionsRivo Accounts
Adding your own custom Javascript
Adding your own custom Javascript

Callbacks, custom javascript and light reloading after login

James Dohm avatar
Written by James Dohm
Updated over 2 weeks ago

Adding your own custom Javascript

You can add any javascript directly – on the Rivo accounts settings page under Javascript Settings for Developers near the bottom of the page.

Onload Javascript

Add any javascript you want to run when the widget loads

On Hash Change Javascript

Add any javascript you want to run when the URL hash changes

Post Sign In Javascript

Add any javascript you want to run after the user signs in

Callbacks

rivo-accounts:initialized 
rivo-accounts:loaded
rivo-accounts:widget:open 
rivo-accounts:widget:close
rivo-accounts:cart:add 
rivo-accounts:items:updated
rivo-accounts:items:removed
rivo-accounts:shopify:login 
rivo-accounts:shopify:logout

When to use Reload After Login

This is a 'light' reload and won't cause any slowdown. We recommend enabling the reload after login because a page load is good for many authentication reasons after someone is signed in.

Did this answer your question?