Site OptimizersPro

    Install on Shopify

    Add the SEO Agent script to Shopify and check that it works.

    This guide shows you how to add the SEO Agent script to your Shopify store, step by step. You don't need to know how to code. The SEO Agent is part of Pro.

    Why it helps

    • One script lets outwrite.ai check your store's pages and apply the SEO fixes you approve, such as clearer page titles and descriptions, without editing each product or page.
    • You install it once. After that, you apply, check and undo fixes from outwrite.ai.

    Before you start

    • You can edit your store's theme in the Shopify admin (store owner, or staff with permission to manage themes).
    • Your website address in outwrite.ai Brand matches your live store address exactly, including www if your store uses it.

    Step 1: Copy your script from outwrite.ai

    1. In outwrite.ai, open Site Optimizers → SEO Agent in the sidebar.
    2. Click Connect your website. If you set this up before, click Install website script at the top right instead. If you then see Create website script, click it.
    3. Click Copy script.

    Your script is one line of code that starts with <script defer src= and ends with </script>. Copy the whole line and don't change any part of it.

    Step 2: Add the script to Shopify

    The script goes in your store's head: a hidden section at the top of every page where settings and scripts live. Visitors never see it. In Shopify, the head is in a theme file called theme.liquid.

    1. In your Shopify admin, go to Online Store → Themes.
    2. Make a backup first: next to your current theme, click the … button, then Duplicate.
    3. Click the … button on your current theme again, then Edit code.
    4. In the file list on the left, under Layout, click theme.liquid.
    5. Click inside the code, press Ctrl+F (Cmd+F on a Mac) and search for </head>.
    6. Click just before </head>, press Enter to make a new line, and paste your script on it.
    7. Click Save. Changes to your current theme go live right away.

    Step 3: Check the installation

    1. Open your store's homepage in a new browser tab. Visiting your store tells outwrite.ai to look for the script.
    2. In outwrite.ai, go to Site Optimizers → SEO Agent. If the badge at the top right already says Installation verified, you're done.
    3. Otherwise, click Install website script, then Check installation. When it works, you see Found on your homepage.
    4. Your first audit starts by itself. It uses 0 credits, and you can leave the page while it runs.

    How to tell it's working

    What you see in outwrite.aiWhat it means
    Setup neededoutwrite.ai hasn't found the script on your homepage yet
    Installation verifiedThe script is on your homepage
    Finding your website’s pages…outwrite.ai is listing your pages. This is free
    Running your free first auditYour pages are being checked. This uses 0 credits
    A number of issues and three scoresThe audit is done. Review your fixes

    Shopify limits

    • The script works on your storefront: home, collection, product, blog and other pages. It never changes cart, checkout or customer account pages.
    • If you switch to another theme, or install a new version of your theme, add the script to that theme too.
    • Store addresses with extra options after a ? (for example a chosen product variant) aren't changed.
    • To make a fix permanent, you can also enter it in the product's or page's Search engine listing in Shopify. The next scan then shows it as Fixed in website source.

    If outwrite.ai can't find the script

    • You edited a different theme. The script must be in the theme that is currently live, not only in the backup copy.
    • The script isn't in the page code. outwrite.ai reads your homepage's code directly. A script added later by a tool such as Google Tag Manager isn't found. Add it to theme.liquid as shown above.
    • Your store is password protected. outwrite.ai can only check a store that is open to the public.
    • Your homepage redirects. Your homepage must open at the website address saved in Brand. If it redirects (for example from example.com to www.example.com), outwrite.ai shows the final address. Before the script is verified, change Website under Brand → Edit business to that address and choose Check installation again; your script stays the same. Once the script is verified, contact support to move the SEO Agent to a different address.
    • Verified, but fixes stay at Awaiting page visit. Open the page in a normal browser window. Ad blockers, privacy extensions and cookie banners that hold back scripts can stop the script from reporting back.

    How to remove the script

    1. In Shopify, go to Online Store → Themes, click … on your current theme, then Edit code.
    2. Open theme.liquid and delete the script line.
    3. Click Save.

    All SEO Agent changes stop on the next page load, and your pages go back to how they were. Your products and store content aren't affected. If you plan to reinstall later, undo any fixes you don't want first. Fixes you haven't undone apply again once the script is back.

    Common questions

    Will the script slow down my store?

    It loads with defer, which means the browser finishes reading your page before running it.

    What does the script send to outwrite.ai?

    Only the page address, to load that page's fixes, and whether each fix appeared. It doesn't send page text, form entries or cookies, and it doesn't track visitors or customers.

    Is this the same as connecting Shopify for publishing?

    No. The script lets the SEO Agent fix your pages. Connect Shopify lets outwrite.ai publish articles to your store's blog. You can use either one, or both.

    Related guides

    Need a hand with your workspace?Get help