Force a new page for single page apps

Our dynamic recordings will automatically detect changes on a page for single page apps and highly dynamic pages (this includes AJAX changes). If you'd like to force Lucky Orange to start a new "page" even if the user is still on the current page you can do so by calling the following function:

<script>
try {
    if (window.LO) {
        window.LO.new_page();
    }
} catch(ex) { }
</script>

Additionally, you can pass a new title to the new page and this will be displayed in your page list dropdown while viewing a recording instead of the current document.title.

<script>
try {
    if (window.LO) {
        window.LO.new_page("New Page Title");
    }
} catch(ex) { }
</script>

Overriding the URL
If your URL does not change and you want to specifically store a URL for each page so you can use that with your heatmaps, form analytics, etc. you will need to also set the following global variable before you call the window.LO.new_page() function.

window.__wtw_lucky_override_save_url = "New URL Here";

Disabling automatic page change detection
If you intend to use the LO.new_page() functionality and want to disable any automatic page change detection, the following global variable will prevent that functionality.

window.__lo_disable_page_detection = true;

Still need help? Contact Us Contact Us