CrawlBrain Docs
Pricing Support Open dashboardDashboard

Shopify

You can add CrawlBrain to a Shopify store with the CrawlBrain app or with a script tag in your theme. Use the app if you can.

CrawlBrain app Script tag
Setup Install, connect, switch on Paste one line in your theme
Products and pages Read from Shopify directly, updated as you edit them Crawled from your storefront daily
Password-protected store Works Cannot be read until the password is removed
Billing Through your Shopify invoice Through CrawlBrain

The CrawlBrain app

  1. Install CrawlBrain from the Shopify App Store.
  2. In the app, click Connect my account. Sign in to CrawlBrain, or create an account. You come back to Shopify connected, and your products, collections, pages and blog articles start importing.
  3. Click Turn on in theme editor. The theme editor opens with CrawlBrain search switched on under App embeds. Click Save.

The CrawlBrain app in Shopify admin

Your store's own search box now opens CrawlBrain. There is nothing to paste and no selector to set.

If the theme editor opens without it switched on, go to Online Store > Themes > Customize and open App embeds in the left sidebar. Switch on CrawlBrain search and click Save.

App embeds in the Shopify theme editor

Edits you make in Shopify reach search on their own, from a new product or a price change to a product set to draft or archived. Draft and archived products never reach shoppers, and neither does anything unpublished.

The script tag

Use the script tag on a store that does not run the app.

  1. Copy your script from Search Widget > Install > Paste one line in CrawlBrain.
  2. In Shopify admin, go to Online Store > Themes.
  3. On your live theme, click the ... button and choose Edit code.
  4. Open layout/theme.liquid.
  5. Paste the script on the line just before </head>, then click Save.
<script src="https://cdn.crawlbrain.com/v1/widget.min.js" data-key="YOUR-AGENT-KEY" async></script>

Pasting the script in theme.liquid

Then click Check installation on the Install page in CrawlBrain.

Duplicate your theme first (... > Duplicate). If anything goes wrong, publish the copy and you are back where you started.

Use your store's search box

In CrawlBrain, set the placement to Replace search bar in Search Widget > Setup. Leave the CSS selector empty. The search icon, the search drawer and the search page of Shopify themes are recognised on their own, on desktop and on phones.

What to exclude

A crawled store has URLs nobody searches for. Cart and checkout pages are already skipped, and so are account pages and sorted copies of collections. Add this one under Exclude paths in Sync Settings:

/collections/*/products/*

Shopify serves each product at /products/handle and again under every collection it belongs to. Excluding the collection copies keeps one page per product.

The app reads products from Shopify instead of crawling, so none of this applies to it.

Better answers

Most store questions are about shipping and returns, or sizes and care, rather than one product. Make sure those pages are published, and add snippets for anything you keep answering by email.

Short product descriptions give short answers. Two sentences about material and fit do more for search than any setting.

Checkout

The widget does not appear on checkout, because Shopify does not run theme code there.

Removing it

If you use the app, uninstall CrawlBrain under Settings > Apps; with the script tag, delete the line from theme.liquid and save. Either way, the widget is gone on the next page load.