Installation Ready-made View

The basic installation method can be used to install AddSearch on HubSpot. To install the AddSearch widget on HubSpot:

  1. Access the page template of your site.
  2. If you have an existing search on your HubSpot site: Find your site’s search form. This is a HTML element that starts with a <form> tag, such as <form id="search">. Once you’ve found the relevant <form> tag, delete it, and everything up to and including the closing </form> tag.
  3. Use our Search Designer tool to configure the widget according to your needs and copy the installation script. Then paste the script into your website template to the place where you want the AddSearch field to appear. Here is an example of how the script snippet might look like:
    <script>
     window.addsearch_settings = {
      "asw_01": {
        "show_search_suggestions": false,
        "search_suggestion_position": "left",
        "default_sortby": "relevance",
        "display_date": false,
        "display_meta_description": false,
        "display_result_image": true,
        "link_target": "_self",
        "hide_logo": false,
        "direction": "ltr",
        "analytics_enabled": false,
        "automatic_filter_results_by_site_language": false
      }
    } 
    </script>
    <script src="https://cdn.addsearch.com/v5/addsearch-ui.min.js?key=xxxxxx&id=asw_01"></script>
    
  4. Save the changes to your template and publish them to your website.

Was this helpful?

Need more help?

We’re always happy to help with code or other questions you might have. Search our documentation, contact support, or connect with our sales team.