Install our SDK

Requirements

To install our widget, first, sign in to our dashboardarrow-up-right. If you don't have an account, feel free to request accessarrow-up-right.

Load the snippet on your website

  1. Copy the snippet code.

  2. Replace "YOUR_PROJECT_ID_HERE" with your project ID.

  3. Paste the updated snippet into the <head> section of your website.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Your website</title>

  <!-- Paste Jimo snippet here -->
  <script>
    (function(j,i,m,o) {
        if (j["jimo"] != null) {
          return;
        }

        var s = document.createElement("script");

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

        document.getElementsByTagName("head")[0].appendChild(s);
    })(window);
  </script>

</head>
<body>
  
</body>
</html>
circle-exclamation

Advance integrations

If you are using a framework, please check the corresponding guide just below

Integrate Jimo in your React.js app

Here is a way to load the snippet with React:

If you are using Typescript, you can find additional typings below.

Typescript

After being injected into your app, Jimo adds some properties to the window object.

To prevent linter errors in your project, update (or create) your global.d.ts file and add the following types

Domain Whitelisting

To prevent CSP (Content Security Policy) errors or if your platform requires some sort of domain whitelisting to load external resources, you will need to add the following domains for Jimo to work properly :


Install with Google Tag Manager

Integrate Jimo using Google Tag Manager

In this notice, we will see how to install Jimo using Google Tag Manager. This feature allows you to create a tag in one of your containers automatically. You can choose only to create the tag or also publish the tag to your Google Tag Manager workspace and make it live.


Go to the installation page

Access Settings > Installationarrow-up-right and locate the “Setup with Google Tag Manager” section.


Setup Google Tag Manager

  1. Click on Connect to “Google Tag Manager”

  2. Select a GTM account.

  3. Select a GTM container

  4. Click to create the tag If you want to publish it at the same time, click on “Create and publish tag for me now” Note that this might require extra permissions from your Google Tag Manager Administrator

Here is an example of a GTM setup:

Self Hosting

You can host the javascript snippet loaded into your application in order to increase the control you have over which version of Jimo runs in your app.

circle-exclamation

Download our javascript sources

You will have to host two javascript files. You can find and download them directly from their public URLs

Update your snippet setup

In order for Jimo to start using your self hosted scripts, please find the following line in your Jimo setup

and replace it with

Finally, please add the following window variable

You are all setup!

Check that everything works normally

Follow this quick checklist to make sure everything is correctly setup.

  1. In your browser, open a page where Jimo is installed

  2. Open the browser Dev Tool and go to the Network tab

  3. Use the JS filter to see only requests that loads a javascript file

  4. Look for a request with this url https://your-domain.com/jimo-invader.js

  5. Look for a request with this url https://your-domain.com/jimo-main.js

Upgrade your version

In order to upgrade your version you only need to Download our javascript sources again and update your hosted files.

Last updated