Read this article on Shopify website search script for more information.
Shopify Scripts are small pieces of code that let you create personalized experiences for your customers in their cart and at checkout. You can also add custom code snippets to get functionality such as search.
Create a Custom Search Engine
Here we will visit the steps required to add the ExpertRec Custom search engine to your website. This is one of the easiest setup processes of all the available options out there and is highly recommended.
- Navigate to https://cse.expertrec.com/newuser?platform=cse and signup with your Google ID.
- Enter your website’s URL when prompted. You can select a server location near you and add the URL of your sitemap if you wish to. These will be auto-detected otherwise.
- You can play around with the settings and customize the UI as the crawl runs. Once it is complete, you can check out a fully functional demo before taking the search to your website.
ExpertRec comes with more customization options that you can explore. You can read this article to find a more detailed guide on the installation and configuration.
Installing ExpertRec using Shopify Website Search Script
- You can take the search to your website with little to no effort. All you need to do is to paste the Shopify Website Search Script available on the dashboard on your website.
- Log in to your Shopify account and click on Online Store
- From the Actions, drop-down menu click Edit code
- To edit the header in the Code editor, search for header and open
header.liquidunder Sections. This is where you will find the search box usually. It may be different in your case.
- Find the code related to the search box and replace it with the code snippet from your dashboard. If you do not have a search box already, then you can directly paste the code snippet.
Save changes and you will have a brand new search live on your site!