# Ostia: full docs > Every docs and how-to page from https://tryostia.com, as markdown. ## Quick start > Add Ostia to your store in about two minutes and see your first AI agent visits. Ostia shows which AI agents visit your store (ChatGPT, Claude, Gemini, Perplexity and others), what they read, and lets you allow or block each one. Setup is one tag, a plugin or a Cloudflare worker. ### 1. Sign in and add your store Open [https://tryostia.com/start](https://tryostia.com/start) and pick your platform. Sign in with Google or an email link; the first sign-in creates your account. Enter your store address. You get: - your **site ID** (made from your domain, like `shop-example-com`), - the **script tag** for your store, - a **store key**, shown once, for server-side installs (the WordPress plugin and the store API). Keep it out of code repositories. ### 2. Install Pick the guide for your platform: | Platform | How | What it does | Time | |---|---|---|---| | Shopify | [Theme tag](/docs/install-shopify) in `theme.liquid` | Sees visits. Rules apply on our app's pages; for full blocking add Cloudflare | 2 minutes | | WordPress / WooCommerce | [Plugin](/docs/install-wordpress), downloaded with your settings filled in | Sees visits and enforces your rules on every page | 2 minutes | | Cloudflare (any site behind Cloudflare) | [API token flow](/docs/install-cloudflare): paste a token, we add one worker | Sees visits and enforces your rules on every page | 2 minutes | | Any other site | [Script tag](/docs/install-script-tag) before `` | Watch only: sees visits, does not block | 1 minute | | Next.js, Remix, Astro, static HTML | [Script tag](/docs/install-script-tag#where-to-paste-it) in your layout file | 1 minute | The tag is: ```html ``` ### 3. Check it works Open your store once in a browser. On [/app](https://tryostia.com/app), the **Install** section turns to **Seeing traffic** within a minute or so. It rechecks every 15 seconds; **Check now** runs it at once. ### 4. Read your first numbers Agent visits show up in [/app](/docs/app) as they happen. Most stores see their first AI agent within a day. From there: - [Allow or block](/docs/rules) each agent. - Turn on the [weekly report](/docs/weekly-report). ### Using an AI assistant? Paste one of the [ready prompts](/docs/ai-prompts) into Claude, Cursor or ChatGPT and it does the install with you. Source: https://tryostia.com/docs/quick-start --- ## Prompts for AI assistants > Copy-paste prompts that get Claude, Cursor or ChatGPT to add Ostia to your store, step by step. Paste one of these into your assistant. Each one points it at these docs, so it uses the current steps instead of guessing. ### Claude (claude.ai or the desktop app) Claude can read web pages. Paste the prompt for your platform, then follow along; Claude tells you each click. ```text Help me add Ostia to my store. Read https://tryostia.com/llms.txt and then the install guide for my platform. My store is https://MYSTORE.COM and it runs on PLATFORM (Shopify / WooCommerce / Cloudflare / custom site). Walk me through it one step at a time, wait for me to say "done" after each step, and finish by telling me how to check it works. ``` ### Claude Code or Cursor (in your site's code) Open your store's project (Shopify theme, Next.js, Remix, Astro or static site) in Claude Code or Cursor's Agent mode. First get your tag: sign in at [/start](https://tryostia.com/start), add your store and copy the script tag. Then paste: ```text Add Ostia to this project. Read https://tryostia.com/docs/install-script-tag.md first. Put this exact tag just before in the shared layout (theme.liquid, app/layout.tsx, pages/_document.tsx, app/root.tsx, the Astro base layout, or every .html page): PASTE-YOUR-TAG-HERE Use is:inline on the script tag in Astro. Change nothing else, and do not write any key or token into the repository. Show me the diff and tell me how to deploy and check the install. ``` ### ChatGPT ChatGPT reads web pages when you ask it to search or browse. ```text Read https://tryostia.com/llms.txt and the Ostia install guide for PLATFORM. Then give me numbered steps to add it to my store https://MYSTORE.COM, using the exact menu names from the guide. Ask me which step I am on if I get stuck. ``` ### Per platform, the short version Paste after any of the prompts above to skip straight to the right guide: | Platform | Add this line | |---|---| | Shopify | `Use https://tryostia.com/docs/install-shopify.md (paste the tag in layout/theme.liquid before ; it watches visits only).` | | WooCommerce | `Use https://tryostia.com/docs/install-wordpress.md (download the plugin from /start, upload, activate).` | | Cloudflare | `Use https://tryostia.com/docs/install-cloudflare.md (create the API token with the three permissions, paste it on /start).` | | Any other site | `Use https://tryostia.com/docs/install-script-tag.md (one tag before on every page).` | ### Why .md links Every docs page has a plain markdown copy: add `.md` to the URL. [llms.txt](/llms.txt) lists them all and [llms-full.txt](/llms-full.txt) has everything in one file. Assistants read these faster and more accurately than the HTML pages. Source: https://tryostia.com/docs/ai-prompts --- ## Install on Shopify > Watch visits with one tag in theme.liquid. Your rules apply on our app's pages; for full blocking, put the store behind Cloudflare. On Shopify you can watch visits today and apply your block rules on our app's own pages. You cannot block agents on your theme pages from inside Shopify. Shopify serves those pages itself, and an app only reaches paths under `/apps/...`. | What you want | How | |---|---| | See agent visits | The tag below (watch only) | | Your block rules on the agent cart, product feed and store facts pages | The Shopify app, once it is in the App Store. A blocked agent gets a plain-text 403 there | | Block agents on every page of the store | Put the store's domain behind Cloudflare and use the [Cloudflare install](/docs/install-cloudflare) | Our Shopify app is not in the App Store yet. Until it is, the tag is the install. ### Steps 1. Sign in at [/start](https://tryostia.com/start), pick **Shopify** and add your store. Copy the tag. 2. In Shopify admin open **Online Store > Themes**. On your live theme click **...** then **Edit code**. 3. Open `layout/theme.liquid`, find `` near the end and paste the tag on the line before it. Click **Save**. 4. Open your store once. [/app](https://tryostia.com/app) shows **Seeing traffic** when the first visit arrives. ```html ``` ### When you change themes The tag lives in the theme. If you publish a different theme, paste it there too. ### What the app will add Once the app is live, installing it replaces the tag with a theme app embed (no code), creates the store for you, and adds order attribution and the reports page. We will email existing stores when it is available. ### Remove it Delete the line from `theme.liquid` and save. Source: https://tryostia.com/docs/install-shopify --- ## Install on WordPress and WooCommerce > Download the plugin with your site ID and store key already filled in, upload it, activate. About two minutes. The WordPress plugin enforces your block rules on the server, before a page renders: an agent you blocked in [/app](https://tryostia.com/app) gets a plain-text 403, and people and search engines get the normal page. On WooCommerce it also sends the orders that came from an AI agent, so /app can count them. Requirements: WordPress 6.0+, PHP 8.0+, WooCommerce 8.0+ for the store features. ### Steps 1. Go to [/start](https://tryostia.com/start), pick **WooCommerce** and sign in (the first sign-in creates your account). 2. Click **Download the plugin**. The ZIP already holds your site ID, and your store key when the store is new. Keep the ZIP private. 3. In WordPress open **Plugins > Add New > Upload Plugin**, upload the ZIP and click **Activate**. The settings fill in on activation. 4. Open **WooCommerce > Ostia**. **Mode** starts on **Observe only**: visits are recorded and nothing changes for visitors. Leave it a week, then switch to **On**. If you added the store before and the ZIP has no key, paste the store key you saved into the **Store key** field. It is used server-side only and is never shown again. ### Settings | Field | What it does | |---|---| | Network URL, Site ID | Filled in for you | | Store key | Secret, server-side only. Leave blank to keep the current key | | Mode | **Observe only** (record only) or **On** | ### Blocking agents On each request that names an AI agent, the plugin asks the network for your store's rules. A blocked agent gets an HTTP 403 with a short plain-text note: this store does not accept visits from this automated agent. Nothing is hidden in the page and no page is rewritten. - People and search engines (Google, Bing, Apple and the like) are never blocked. - The check has a half-second limit. If it is slow or fails, the visit is allowed. - The rules are the ones you set in [/app](https://tryostia.com/app) > **Block or allow**. Observe only mode does not change this: use your rules to choose. ### Pages the plugin adds - `/llms.txt` for AI assistants, - a product feed for agents. If those pages answer 404, open **Settings > Permalinks** and click **Save** once. ### No WooCommerce? On a plain WordPress site, the [script tag](/docs/install-script-tag) works too: paste it with any header/footer code plugin, or in your theme's `footer.php` before ``. ### Uninstall Deactivate and delete the plugin. Its settings are removed. Order notes it added stay on past orders. Source: https://tryostia.com/docs/install-wordpress --- ## Install on Cloudflare > If your site is behind Cloudflare, paste one API token and we add a small worker that puts the tag on every page. Any site whose domain runs through Cloudflare (orange cloud) can install without touching the site's code. This is full protection: the worker enforces your block rules on every page, so it also covers Shopify and any other store that sits behind Cloudflare. ### Steps 1. Go to [/start](https://tryostia.com/start), pick **Cloudflare** and enter your store address. 2. Click **Create the token in Cloudflare**. The link opens Cloudflare with three permissions filled in: | Permission | Access | Why | |---|---|---| | Account: Workers Scripts | Edit | to add the worker | | Zone: Workers Routes | Edit | to add the route for your host | | Zone: Zone | Read | to find your zone | 3. Create the token, copy it, paste it on /start and click **Connect and install**. You see each step as it runs. 4. Open your store once. [/app](https://tryostia.com/app) shows **Seeing traffic** when the first visit arrives. We use the token once, for those few calls, and never keep it: it is not stored, logged or put in a URL. You can delete the token in Cloudflare right after. Your store key is saved in the worker as an encrypted secret named `STORE_KEY`. ### What gets added One small worker and one route, `/*`. The worker passes every request to your site unchanged, adds the script tag to HTML pages, and answers an agent you blocked in [/app](https://tryostia.com/app) with a plain-text 403 (People and search engines always get your normal site). With `STORE_KEY` set, it also counts each visit after your page is sent, so AI assistants and crawlers that never run scripts show up too. If anything in it fails, visitors get your site's own response. Nothing else on your zone is changed. ### By hand instead On /start, the Cloudflare step also shows the worker script and these steps: 1. In Cloudflare open **Workers & Pages > Create > Start with Hello World**, name it and deploy. 2. Open **Edit code**, replace everything with the script from /start and deploy again. 3. Open the worker's **Settings > Domains & Routes > Add > Route**. Route `/*`, your zone. Save. 4. Open **Settings > Variables and Secrets > Add**, type **Secret**, name `STORE_KEY`, value your store key. Deploy. ### Your site is a Cloudflare Worker already? The same install works. The route runs before your site's worker, sees each request first and hands it on unchanged. ### Remove it Delete the route and the worker in the Cloudflare dashboard. Source: https://tryostia.com/docs/install-cloudflare --- ## Install with a script tag (watch only) > One line before works on any site and shows you the visits. It does not block anything. The script tag works on any site where you can edit the page template. It is **watch only**: it sees visits and never blocks. To enforce your block rules, use the [WooCommerce plugin](/docs/install-wordpress) or the [Cloudflare install](/docs/install-cloudflare). ### Steps 1. Sign in at [/login](https://tryostia.com/login) and add your store, or go through [/start](https://tryostia.com/start). Copy the tag shown for your store. 2. Paste it just before `` on every page. Most sites have one shared footer or layout file for this. 3. Publish, then open your store once. [/app](https://tryostia.com/app) shows **Seeing traffic** when the first visit arrives. ```html ``` ### Options | Attribute | Values | What it does | |---|---|---| | `data-endpoint` | your store's endpoint | Where visits are sent. Leave it as given. | The tag loads asynchronously and never blocks the page. If our service is unreachable, your page loads as normal. ### What the tag can and cannot see The tag sees AI agents that open your pages in a browser, which is how browser-based agents such as ChatGPT agent and Claude in Chrome shop. Agents that only fetch the raw HTML and never run scripts are not seen by a tag. If your site is behind Cloudflare, the [Cloudflare install](/docs/install-cloudflare) covers both. ### Where to paste it | Stack | File | |---|---| | Plain HTML | every `.html` page, before `` | | Next.js (App Router) | `app/layout.tsx`, inside `` | | Next.js (Pages Router) | `pages/_document.tsx`, before `` | | Remix / React Router | `app/root.tsx`, before `` | | Astro | your base layout, as `