Run script on route show

I built a little prototype of a mobile onboarding process with Hype(javascript animation tool)

It needs this script to run to display on page:

<script type="text/javascript" charset="utf-8" src="onboarding.hyperesources/onboarding_hype_generated_script.js?78013"></script>

If I include the script on a subpage it does not work, if I include it on the index page, I need to refresh the route page and sometimes it displays.

Is there a way to run this script on route show event?

Community Page
Last updated: