Site OptimizersPro

    Install on any other website

    Add the SEO Agent script to a custom-built site, Squarespace or any builder that allows custom code.

    This guide shows you how to add the SEO Agent script to any website that isn't covered by the other install guides: a site built by a developer, Squarespace, or any builder that lets you add custom code. The SEO Agent is part of Pro.

    Why it helps

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

    Before you start

    • Your website lets you add custom code to every page. Some hosted plans don't allow this.
    • You (or your developer) can edit that code and publish the site.
    • Your website address in outwrite.ai Brand matches your live site exactly, including www if your site 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 your website

    The script goes in your site's head: a hidden section at the top of every page where settings and scripts live. Visitors never see it. In the page code, it is everything between <head> and </head>.

    1. Find the place that controls the head of every page. The table below shows where to look.
    2. Paste your script there. In page code, paste it on its own line just before </head>.
    3. Save, then publish or deploy your site.
    Your siteWhere to look
    SquarespaceCode injection, in the site-wide Header field (Squarespace help)
    Another website builderA setting called code injection, custom code, header code or tracking code. Choose the site-wide head option
    A site built by a developerThe shared layout or header template that every page uses
    A web app (React, Vue, Angular and similar)The main index.html file, or the root layout or document file

    Add it once, for the whole site. Don't add it to individual pages or inside an embed block.

    Step 3: Check the installation

    1. Open your website's homepage in a new browser tab. Visiting your site 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

    Limits for custom-built sites

    Share this section with your developer if you have one.

    • The script must be in the page code your server sends. outwrite.ai checks for it by reading your homepage's code directly, so a script added later by JavaScript or a tag manager isn't found. On server-rendered sites, include it in the rendered HTML.
    • Keep the defer attribute and the exact address. Don't host a copy of the script yourself.
    • Single-page apps are supported. Install the script once in the main page. It notices page changes made without a full reload.
    • Framework-built pages get fewer automatic changes. When the script detects React, Next.js, Vue, Nuxt, Angular, Gatsby, SvelteKit or Astro, it doesn't swap heading elements or insert new links, because that can conflict with how those pages load. Make those changes in your components. Titles, descriptions, image descriptions and other tag changes still work.
    • Content that only appears with JavaScript may not be checked. The audit reads the page code your server sends. If a page has very little text before JavaScript runs, you'll see a suggestion to check it. Server rendering or prerendering solves this.
    • Content Security Policy. If your site sets one, allow the origin of the script address in both script-src (to load the script) and connect-src (so it can load fixes and report back).
    • Not in an iframe. The script only works in the main page.

    If outwrite.ai can't find the script

    • Saved, but not published. Make sure the change is deployed to your live site, not only a preview or staging copy.
    • An old copy is cached. Clear your site and CDN cache, then check again.
    • The script isn't in the page code. On your live homepage, view the page source and search for site-health/script. If it isn't there, the script is being added too late or not at all.
    • 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, cookie banners that hold back scripts, and a strict Content Security Policy can stop the script from reporting back.

    How to remove the script

    1. Delete the script line from the same place you added it.
    2. Save and publish or deploy your site.

    All SEO Agent changes stop on the next page load, and your pages go back to how they were. Your website content isn'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 site?

    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 (without common tracking tags), 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.

    Is this the same as connecting my website for publishing?

    No. The script lets the SEO Agent fix your pages. Publishing connections let outwrite.ai send articles to your site. See Connect your tools for the options. You can use either one, or both.

    Related guides

    Need a hand with your workspace?Get help