3 步驟安裝教學
- 1
在 AEO Pro 產生一把 API key 並登記商店網域
登入 AEO Pro → /dashboard/settings/api-keys 點「Generate new key」,複製 aeopro_ 字串。再到 Dashboard → Sites → Add Site 新增你的 my-shop.com 主網域 + my-shop.myshopify.com(兩個都加才能正確抓 GoogleBot 與 GPTBot 流量)。
- 2
新增 snippets/aeo-pro.liquid 並從 theme.liquid 引入
在 Shopify 後台 → Online Store → Themes → Edit code,於 Snippets 區建立 aeo-pro.liquid,貼上下列內容(把 api_key 換成你的 key)。然後在 layout/theme.liquid 的 </head> 前一行加上引入語法。
範例程式碼liquid · snippets/aeo-pro.liquid{%- comment -%} AEO Pro · Schema + llms.txt injector Drop in snippets/aeo-pro.liquid, then include once from theme.liquid: {%- render 'aeo-pro' -%} Replace the api_key constant with your aeopro_ key. {%- endcomment -%} {%- assign api_key = 'aeopro_xxxxxxxxxxxxxxxxxxxxxxxxxxxx' -%} {%- assign endpoint = 'https://www.aeo-pro.app/api/v1/schema/generate' -%} <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "name": "{{ shop.name | escape }}", "url": "{{ shop.url }}", "logo": "{{ shop.brand.logo | image_url: width: 512 | default: 'https://www.aeo-pro.app/icon' }}" } </script> {%- if template contains 'product' and product -%} <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", "name": {{ product.title | json }}, "image": [{{ product.featured_image | image_url: width: 1200 | json }}], "description": {{ product.description | strip_html | truncate: 600 | json }}, "sku": {{ product.selected_or_first_available_variant.sku | json }}, "brand": { "@type": "Brand", "name": {{ shop.name | json }} }, "offers": { "@type": "Offer", "url": "{{ shop.url }}{{ product.url }}", "priceCurrency": {{ shop.currency | json }}, "price": {{ product.selected_or_first_available_variant.price | money_without_currency | json }}, "availability": "{% if product.available %}https://schema.org/InStock{% else %}https://schema.org/OutOfStock{% endif %}" } } </script> {%- endif -%} <link rel="aeopro-citation-stream" href="https://www.aeo-pro.app/api/v1/citations/stream?shop={{ shop.permanent_domain }}" data-api-key="{{ api_key }}"> - 3
在 robots.txt 與 llms.txt 自動套用 AI 爬蟲允許清單
Shopify OS 2.0 把 robots.txt 抽象成 robots.txt.liquid(templates/)。在 AEO Pro Dashboard → Sites → 你的商店 → robots tab 複製建議內容覆蓋。/llms.txt 則由 AEO Pro 代為託管 — 在 Cloudflare / DNS 加 301:/llms.txt → https://www.aeo-pro.app/llms/{shop-handle}.txt 即可。
範例程式碼liquid · layout/theme.liquid{%- comment -%} Add this once in layout/theme.liquid, just before </head>: {%- endcomment -%} {%- render 'aeo-pro' -%}
常見問題
- Hydrogen / Headless 商店怎麼設?
- Headless 商家不要用 Liquid snippet — 改用 /api/v1/schema/generate REST 端點,於 SSR 階段在 <Head> 注入 JSON-LD。同一把 API key 共用,計費仍走商店維度。
- 會違反 Shopify App 規範嗎?
- 不會。本整合是 Liquid snippet + 外部 REST 呼叫,未使用 Shopify App API 也不涉及 Customer Data。若想走 App 化(Embed in Admin),AEO Pro Shopify App 已在 review,預計 2026 Q3 上架。
- OS 1.0(舊版主題)支援嗎?
- 支援,但需要把 snippet 放進 templates/ 而非 sections/,且要手動把 robots.txt 內容貼到 Shopify 主題的 robots.txt(OS 1.0 沒有 .liquid 版本)。
- 可以只在特定商品注入 Product schema 嗎?
- 可以。在 snippet 內加上 if 條件,例如 {% if product.metafields.aeo.enabled == true %}…{% endif %}。配合 Metafields 編輯器即可逐一控制。