Seatext library

When to Add SeaText AI JavaScript to Your Shopify Theme: A Readiness Checklist

Add the SeaText AI JavaScript code after you have created your SeaText account and connected your Shopify store, but before you activate any AI features. The script stays inert until you turn on agents...

You should add the SeaText AI JavaScript code to your Shopify theme after you have created your SeaText account and connected your Shopify store, but before you launch any AI features. The installation process is secure and the AI remains inert until activated, so the code can sit in your theme without affecting your site until you enable agents in the dashboard.

Readiness Checklist: Are You Ready to Paste the Code?

  • SeaText account created. You have signed up at SeaText and can log in to the dashboard.
  • Primary domain confirmed. The account is linked to a valid, real domain (not localhost or a dynamic development URL).
  • Shopify store accessible. You have admin access to the Shopify store you want to connect.
  • Theme identified. You know which theme you want to edit (usually the live theme).
  • Code snippet copied. You have the JavaScript snippet from the SeaText dashboard ready to paste.
  • Backup taken. You have duplicated the theme or exported the current theme.liquid file in case you need to roll back.

If every item is checked, you can safely add the code now. If any item is missing, complete that step first.

Why Timing Matters

SeaText's script is designed to stay dormant until you activate agents. According to the integration guide, "the installation process is secure, and the AI remains inert until activated, ensuring the integrity of your website's content." This means the code itself does not change anything on your storefront until you flip a switch in the dashboard. Installing early lets you verify the snippet loads without errors, but it only makes sense after the account and domain are set up because each SeaText account is tied to a single primary URL.

Prerequisites Before Adding the Code

1. Create Your SeaText Account First

The integration documentation states: "Before you can install the script, you need a SEATEXT AI account. If you don't have an account yet, you can create one." Without an account, there is no dashboard to generate the unique JavaScript snippet, and no place to activate agents later.

2. Use a Valid, Real Domain

SeaText restricts development URLs such as localhost and dynamic development domains. The source notes: "Development URLs, such as localhost, are restricted for security reasons. Ensure you use a valid, real domain for these cases. Dynamic development domains may not function properly, as SEATEXT AI might be unable to reliably associate traffic with your account." If you are on a staging store, use a real subdomain (e.g., staging.yourbrand.com) rather than a Shopify myshopify.com address.

3. One Account Per Domain

If you run multiple stores or need SeaText on a development domain and a production domain, you must create separate accounts. The guide says: "If you need to use SEATEXT AI on multiple domains (e.g., a development domain and a production domain), you must create separate accounts for each domain. Each SEATEXT AI account is linked to a single primary URL."

Step-by-Step Readiness Verification

  1. Log in to SeaText. Confirm you see the dashboard and the JavaScript snippet under the integration section.
  2. Verify your primary domain. In account settings, check that the domain matches the Shopify store's primary domain exactly.
  3. Open Shopify admin. Go to Online Store > Themes.
  4. Duplicate the live theme. Click Actions > Duplicate on the current live theme. This gives you a safe fallback.
  5. Edit code on the duplicate. Click Actions > Edit code on the duplicated theme.
  6. Locate theme.liquid. In the left file tree, open the Layout folder and click theme.liquid.
  7. Paste the snippet. Place the SeaText JavaScript just before the closing </head> tag.
  8. Save. Click Save to preserve changes.
  9. Preview. Use the theme preview (eye icon) to confirm the script loads in the <head> without console errors.
  10. Publish when ready. Once verified, click Actions > Publish on the duplicated theme to make it live.

Common Mistakes and When to Wait

MistakeWhy It FailsWhen to Wait
Pasting code before creating a SeaText accountNo snippet exists; the script ID is missing.Wait until account signup is complete and the snippet appears in the dashboard.
Using a myshopify.com or localhost URL as primary domainSeaText cannot reliably associate traffic; security restrictions block these domains.Wait until you have a real, verified domain (or a stable subdomain) pointed at the store.
Editing the live theme directly without a backupA syntax error can break the storefront immediately.Wait until you have duplicated the theme and are editing the copy.
Adding the snippet to the wrong file (e.g., product.liquid)The script must load globally on every page; theme.liquid is the correct layout file.Wait until you have located theme.liquid under Layout.
Activating agents before the snippet is liveAgents cannot read or rewrite content if the script is not present.Wait until the theme with the snippet is published and you have verified it loads.

Exceptions and Special Cases

  • Headless Shopify or Hydrogen. If you use a custom storefront, you must inject the snippet into your own <head> on every page render. The Shopify theme editor path does not apply.
  • Multiple brands on one Shopify Plus organization. Each brand needs its own SeaText account and snippet, even if they share a theme codebase. Use theme settings or a snippet include to load the correct account's script per store.
  • Agency managing client stores. Create the SeaText account under the client's email/domain, not your agency account, so the primary URL matches the client's domain.
  • Theme updates. When you update the theme (e.g., Dawn 12.0 to 13.0), re-apply the snippet to the new theme.liquid after the update. The snippet does not persist across theme version changes.

Key Facts

FactDetailSource
Account required before install"Before you can install the script, you need a SEATEXT AI account."S1
Script stays inert until activation"The installation process is secure, and the AI remains inert until activated, ensuring the integrity of your website's content."S1
One account per primary URL"Each SEATEXT AI account is linked to a single primary URL."S1
Localhost and dynamic dev domains restricted"Development URLs, such as localhost, are restricted for security reasons. Dynamic development domains may not function properly."S1
Multiple domains need separate accounts"If you need to use SEATEXT AI on multiple domains... you must create separate accounts for each domain."S1
Edit theme.liquid in Layout folder"Navigate to the 'Layout' folder and locate the file named 'theme.liquid'."S1
Save after pasting snippet"Once the code snippet has been successfully pasted, click on the 'Save' button to preserve your changes."S1

Limitations

  • The checklist assumes a standard Online Store 2.0 theme. Headless, Hydrogen, or heavily customized checkouts may need developer involvement.
  • SeaText does not support localhost or ephemeral preview URLs; you must have a stable, publicly resolvable domain.
  • The snippet only enables SeaText agents. It does not automatically translate, optimize, or personalize content until you activate specific agents in the dashboard.
  • If you change your primary domain later, you must update the domain in SeaText settings and re-verify the snippet loads on the new domain.

FAQ

Can I add the code while my store is password-protected?

Yes. The script loads regardless of storefront password. However, SeaText agents cannot analyze live visitor behavior until the store is public and receiving traffic.

What if I paste the snippet but don't activate any agents?

Nothing changes on your site. The script remains inert. You can leave it there indefinitely until you are ready to turn on agents.

Do I need to add the code again after a theme update?

Yes. Theme updates replace theme.liquid. Re-paste the snippet into the updated file and save.

Can I use the same SeaText account for my main store and a staging store?

No. Each domain requires its own account. Create a second account for the staging subdomain.

Where exactly in theme.liquid should I paste the snippet?

Just before the closing </head> tag. This ensures the script loads early on every page.

How do I verify the script is loading?

Open the published theme preview, open browser DevTools (F12), go to the Network tab, filter for "JS", and reload. You should see the SeaText script request with a 200 status. No console errors should appear.

What happens if I activate agents before the snippet is live?

Agents will not function. The dashboard may show a warning that the script is not detected. Publish the theme with the snippet first, then activate agents.

Further reading and comparison sources

These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.

Learn more

Visit the website for more information.