Drupal has a default search engine that offers certain basic search features that needs a lot of improvement. Expertrec has built a drupal search engine that adds extra functionalities to the default drupal search. Here is a list of the extra features that expertrec adds.
How to create a Drupal search engine?
In this method, we will create a drupal search using expertrec and add it to your Drupal site using Google tag manager drupal plugin.
Creating a drupal search using expertrec
- Go to drupal search creator.
- Sign up with your Gmail id.
- Enter your drupal website and sitemap URL.
- Crawl of your website will start.
- Once the crawl completes. go to the code section and copy the code.
- You can as well check the demo of how your Drupal search will work.
Adding the search engine using google tag manager
- Install the google tag manager extensionfor drupal.
- Once you install, go to General-> Container ID-> and add your google tag manager ID to it. Google tag manager lets you add and manage multiple code to your website and choose how to fire each of them.
- Go to drupal search code and add the first part of the code (the code that begins with <script>) to your google tag manager as a custom HTML.
- Under triggers, set it to all pages where you want the search engine to be displayed.
- In your Drupal admin panel, go to Structure-> Block layout-> Header ->Place block-> Add custom block-> click on source and enter the following code. (choose text format as full HTML). This places the search box in your Drupal header.
- The drupal search will look similar to the image below.