Moving Intelligems Script Location Below importmap

If you are seeing the below error in your Intelligems app:

This means the we have detected that your Shopify theme utilizes a feature called importmap. In the case that a Shopify theme is using importmap, the Intelligems script must be placed after the importmap script in your theme.liquid file.

Here are the steps to make this change:

  1. Locate where the Intelligems script is currently located in your theme.liquid file by doing Command + f and searching for Intelligems. It should look something like the below, but "123456789" will be your account ID.

<script>
    window.Shopify = window.Shopify || {theme: {id: {{ theme.id }}, role: '{{ theme.role }}' } };
    window._template = {
        directory: "{{ template.directory }}",
        name: "{{ template.name }}",
        suffix: "{{ template.suffix }}"
    };
 </script>
<script type="module" fetchpriority="high" src="https://cdn.intelligems.io/esm/123456789/bundle.js"></script>
  1. Select the full script - copy it to your clipboard and delete it from that location in your theme.liquid file.

  2. Locate where the importmap script is currently located in your theme.liquid file by doing Command + f and searching for importmap. It should look something like the below:

<script type="importmap">{
        "imports": {
          "vendor": "",
          "theme": "",
          "photoswipe": ""
        }
      } 
</script>
  1. Paste the full Intelligems script below the importmap script.

  2. Save your changes.

If you have any questions, please reach out to our support team for assistance herearrow-up-right!

Last updated

Was this helpful?