Snippet | How to
Give Feedback

Manual initialization

Updated on March 16, 2023

By default, Jimo will run automatically when a user visit a page where the snippet is installed. But you may want to prevent this and have the control on when Jimo should start working.

1. Prevent automatic initialization

If you want to prevent the script from loading automatically, you will have to add JIMO_MANUAL_INIT to your snippet integration (see example bellow).

<script>
    window.jimo = [];
    (function(j,i,m,o) {
        var s = document.createElement("script");

        s.type = "text/javascript";
        s.async = true;
        s.src = "https://undercity.usejimo.com/jimo-invader.js";
        j['JIMO_PROJECT_ID'] = "YOUR_PROJECT_ID";

        j['JIMO_MANUAL_INIT'] = true; // <- Add this
        
        document.getElementsByTagName("head")[0].appendChild(s);
    })(window);
</script>

2. Initialize Jimo manually

To initialize Jimo, you will have to call window.jimoInit()

3. Kill Jimo manually (optional)

To kill Jimo, you will have to call window.jimoKill()