Shopify Hydrogen
Verify and troubleshoot
Run these checks on the preview deployment first, then again on production.
Check the routes#
Replace your-domain with the deployment's hostname and 1234567890 with the numeric id of one of your products.
# Your llms.txt, at both paths
curl -s https://your-domain/llms.txt | head
curl -s https://your-domain/apps/aiptimise/llms.txt | head
# The AI sitemap
curl -s -o /dev/null -w '%{http_code}\n' https://your-domain/apps/aiptimise/sitemap.xml
# A product's AI page, as an AI crawler and as a search crawler
curl -s -o /dev/null -w '%{http_code}\n' -A 'GPTBot' \
https://your-domain/apps/aiptimise/products/shopify_1234567890
curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' -A 'Googlebot' \
https://your-domain/apps/aiptimise/products/shopify_1234567890
# The end of robots.txt
curl -s https://your-domain/robots.txt | tail -20- Both llms.txt URLs return the same text: your store's llms.txt.
- The sitemap answers 200.
- The AI page answers 200 for
GPTBot. A search crawler such asGooglebotgets a 301 to the product's normal page instead, so search engines index your page, not ours. - Once you have agreed to the robots.txt change, robots.txt ends with a
# Aiptimise: AI crawler rulescomment, Aiptimise's groups and aSitemap:line for/apps/aiptimise/sitemap.xml.
Check the head links#
View the source of your home page and of a product page. Their <head> ends with <link rel="alternate" …> tags pointing to /apps/aiptimise/llms.txt (home) and /apps/aiptimise/products/shopify_{id} (product). Your own title, canonical and JSON-LD tags are unchanged. A newly deployed worker adds the links from its second request on, once its first background read has answered.
Check the product block#
- Block off (the default): a product page's
application/ld+jsonProduct node is your own. - Once Aiptimise has switched it on: the node carries Aiptimise's fields (for example
alternateNameandcategory) with youroffersexactly as before. - With
AIPTIMISE_PRODUCT_JSONLD=off: your own node again, and the head links still there.
Check visit analytics#
- In a new tab, open a product URL with
?utm_source=chatgpt.comadded (or follow a link from a ChatGPT answer), and accept analytics cookies if your banner asks. - In the browser's network panel, the page posts once to
app.aiptimise.com/api/events/shopify/ref-hit. - Browse two or three pages. Each one posts to
app.aiptimise.com/api/events/shopify/page-timewhen it opens, and again with the time spent when you leave it.
A reload or a back/forward navigation is never counted as a new arrival, and a visit that did not come from an AI assistant sends nothing at all.
Check checkout attribution#
After such a visit, with analytics consent, add a product to the cart and place a test order. The order's Additional details in your Shopify admin show _aiptimise_ref and _aiptimise_visit. Shoppers never see them.
Troubleshooting#
| What you see | Likely cause |
|---|---|
| Both llms.txt URLs answer 404. | AIPTIMISE_SITE_ID or AIPTIMISE_SITE_SECRET is missing from this environment, or the deployment predates them. Set both and redeploy. |
503, and your Oxygen logs show [aiptimise] proxy forward. | Aiptimise refused or could not be reached. Most often the hostname is not yet listed for your site (every preview deployment has a new one), or the secret was copied wrongly. Send us the hostname and the time of the request. |
| robots.txt has no Aiptimise lines. | Consent to the robots.txt change has not been recorded yet, or your robots.txt already names every crawler in our groups. Rules are cached for a day after a change. |
| No head link on product pages. | The loader does not return aiptimise, or the product id is not at product.id: pass the productId option. |
| The block is switched on, but a product page still shows your own Product node. | The product query lacks the aiptimiseJsonLd field (or the aiptimiseJsonLd option points elsewhere), the product's metafield is still empty, your node has no offers or a different @id, the page prints two Product nodes, or AIPTIMISE_PRODUCT_JSONLD=off is set. Your block is kept in every one of these cases. |
No ref-hit request. | <AiptimiseAnalytics> is outside <Analytics.Provider>, or the browser console shows a Content-Security-Policy error: add https://app.aiptimise.com to connect-src. |
A ref-hit but no page-time. | Analytics consent was not given. Per-page reports need it; the single arrival report does not. |
No _aiptimise_ref on a test order. | Analytics consent was not given, the cart action does not call updateAiptimiseCartAttributes, or your cart query fragment does not select attributes. |
Still stuck? Write to support@aiptimise.com with the URL, the time and any [aiptimise] log lines.