I’m in the process of moving our blog from Wordpress over to HubSpot and so far I haven’t been able to find any documentation on how to offer a search option for visitors. I realise this example is probably custom development, but are there any global modules that would help us achieve a basic free text search of all blog posts? If so, can anyone point me in the direction of the documentation?
The site search function on the HubSpot site was built with a great deal of custom development. However, I did locate a post from our Designers blog on creating custom site search on the COS: Introducing Site Search
Hopefully, this article points you in the right direction, but it would be great to hear from some experienced COS designers/developers on the topic. @stefen@ndwilliams3 do you guys have any input on this?
I haven’t really implemented any site search using Google CSE. The post @relabidin provided, looks like a simple implementation that could be handled by anyone with basic Javascript knowledge.
Looking under the hood of the hubspot.com site, it appears they are using the CSE API with their own custom callback script to populate a modal window. You could definately create something similar, but you would need a Javascript pro familiar with the CSE api.
I’m the marketer here rather than a designer/developer, but I know enough to have been able to install this and get it working on our site. I do have a question though if you don’t mind…on my site, the search overlay seems to sit behind the main navigation and side scroll bar so I lose the box to type the search in as well as the close link. I was able to adjust the positioning of the overlay in the css to bring it down enough to be able to see it all below the nav, but it looks like something in the css also adjusted the positioning of the menu.
I don’t seem to have a scroll bar on the result set at all, unlike the demo running on your site, which means I can’t scroll the results if they go further than the one page - it just scrolls the page in the background.
Can you think of anything obvious I may have done wrong, or overlooked before I get our developer to take a closer look?
@LoisJ it sounds like a z-index issue. I’ve updated the css with a higher z-index and with the fix for scrolling results. Try again with the latest files and see if that helps..
we’ve just found out that HubSpots’ Site Search is now in Beta. If you use the new design manager, you can sign up here: Welcome to the Site Search Beta
We’ve been playing around with the feature since yesterday and you can see our first results in our Blog: https://www.hoppe7.de/blog
There is also an API-Endpoint for every HS-Portal: DOMAIN/_hcms/search?term=inbound
Has anyone conquered this for a global site? We have essentially one domain, but on it runs different subdirectories (e.g. /uk or /au). While the beta search from Hubspot seems to be OK, it would search *all* our sites, which would be a terrible user experience. Has anyone gotten around this? With so much content on our site, I"m eager to figure out how to implement search.
Thanks for the response! We have subdirectories, not subdomains (e.g. /uk or /au off of our main domain not mainsite.uk.com or mainsite.au.com). Does this functionality work the same as with subdomains?
You can now add a `pathPrefix=` query param to filter results by path prefix. `https://www.hubspot.com/_hcms/search?term=hubspot&minScore=0&pathPrefix=services` as an example to only return results that match `hubspot.com/services*`. This requries a reindex of portals, so may take up to 24 hours to be available for your portal.
Hi @mcoley, The pathPrefix parameter sounds very useful to me. Where is this variable entered? In the Site Search Input module or Site Search Results module? In the snippet, JS or elsewhere?
How do I configure a sub folder such as /en/app/services instead of only /services ?