# Install RightMessage on Shopify

You'll add RightMessage to your Shopify storefront theme and check that it's receiving data from your product, collection, and content pages.

Add RightMessage to your Shopify storefront so you can ask shoppers questions and show relevant offers. One theme edit covers the pages that use that layout. It doesn't install RightMessage in checkout.

## Add the snippet to your theme

You'll need a [RightMessage project](https://rightmessage.com/help/create-an-account), an editable **Online Store** theme, and permission to edit and publish theme code. If code editing isn't available, ask the store owner to check your permissions and plan. This isn't a Shopify Plus checkout customization.

Duplicate your theme first so you have a recovery copy. Check the theme and any tag manager for RightMessage, and keep only one installation per page.

1. In RightMessage, select your project and open **Settings** > **JavaScript Snippet** under **Project**.
2. Keep **Live website** selected and copy the full **Snippet Code**.

![RightMessage live-website Snippet Code panel with the Copy to clipboard icon highlighted in orange](https://rightmessage.com/help/screens/platforms-snippet-copy.light.webp)

3. In Shopify, open **Online Store** > **Themes**.
4. Open the **…** menu on your theme copy and choose **Edit code**.
5. Open `layout/theme.liquid` and paste the snippet immediately before `</head>`. Keep the existing Liquid output and scripts.
6. Choose **Save** and preview the edited theme.
7. When you're happy with its pages, publish the theme through **Online Store** > **Themes**.

Saving an unpublished theme leaves your live storefront unchanged. Saving code in the live theme changes it immediately. Once the snippet is live, it can show questions, offers, and personalizations you've already published in RightMessage.

`theme.liquid` is Shopify's default storefront layout. Ask your theme developer to check any custom layouts or templates that bypass it. Checkout, customer-account pages, and order-status pages aren't covered by this theme edit. Shopify has retired legacy checkout scripts in favor of checkout extensions, so don't use old checkout instructions to extend this installation.

If you change or update themes, check that the theme you publish still has the snippet. Shopify documents [theme code editing](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/edit-code/edit-theme-code) and [layout coverage](https://shopify.dev/docs/storefronts/themes/architecture/layouts).

## Check that it's working

1. Visit your published storefront and follow its consent prompt if it controls the snippet.
2. Open a product, collection, and content page that use the edited layout.
3. In RightMessage, open **Settings** > **JavaScript Snippet** and look for a recent timestamp in **Snippet Health**.

![Snippet Health showing the last data receipt timestamp for the local example project](https://rightmessage.com/help/screens/account-snippet-health.light.webp)

A recent timestamp means RightMessage is receiving data. Use the [debugger](https://rightmessage.com/help/best-practices-for-testing) to see what it knows about the visitor and what it's showing on each page.

If no data arrives, follow [installation troubleshooting](https://rightmessage.com/help/common-set-up-issues).

Next, [build a resource recommendation in the app](https://rightmessage.com/help/first-experience-in-the-app).
