For the complete documentation index, see llms.txt. This page is also available as Markdown.

Updating the Intelligems Script

Context

Historically, Intelligems utilized a version of its script known as the CommonJS script. In December 2024, an update was released, transitioning to a new and improved version called the ESM script.

Here’s how the scripts differ:

Pre-December 9, 2024 (CommonJS Script)

The final line of the script looks like this (with abcdefghijk replaced by your unique customer ID):

<script src="https://cdn.intelligems.io/abcdefghijk.js"></script>

Post-December 9, 2024 (ESM Script)

The updated script uses the following format (with abcdefghijk replaced by your unique customer ID):

<script type="module" src="https://cdn.intelligems.io/esm/abcdefghijk/bundle.js"></script>

Key differences include:

  1. type="module" – the script is now a JavaScript module.

  2. esm – the directory structure reflects the new ESM format.

  3. bundle – the updated structure for improved performance.

Required Changes

You can check your installation on the top right of settings page.

If you're script is out of date you can update starting from right here:

  1. Click the button in that block that says "Copy". This will copy your unique Intelligems script to your clipboard.

  2. Now head over to your Shopify account, and replace your current Intelligems Script with your new one. The script should be included as a source in the <head> of each of these files:

    1. theme.liquid

    2. any other theme.*.liquid files (e.g., theme.gempages.liquid if you have this file)

    3. checkout.liquid (if you have this file; most themes do not)

Here is a video walking through those steps:

The app embed means you don't do this again. Shopify injects the current script for you, so script updates land without a theme deploy and you stay on the latest version. Our newer performance work needs the embed too.

If your theme uses importmap, the ESM script has to sit below it. This page has the fix.

Post-Purchase Page for Theme Change Experiences (Legacy Checkout Only)

Note: This step only applies if your store still has access to the legacy Shopify checkout (checkout.liquid). Most stores have been migrated to Checkout Extensibility and will not see this section in their Shopify admin. If you don't see a "Post-purchase page" section under Settings → Checkout, you can skip this step—the preview bar will be hidden automatically.

If you are planning to run a theme change experience and still have access to the Additional Scripts section for the Post-purchase page, you should update your script there as well. This will hide the theme preview bar from showing up on your thank you page. You can get to the Additional Scripts section pictured below by going to Settings -> Checkout -> Scroll about halfway down to "Post-purchase page".

Last updated

Was this helpful?