Implement Google Search Bar in Confluence Space
Asked by Patrick Voulli?:

Hey,

we are new in the Confluence-World. Sorry if this Question is allready answered - we had no results using the Knowledge base. We would like to create a Confluence-Space that is the Home landing Page for every employee. Is it possible to implement a Google Search Bar to our Space? This would really add some every day functionality to our space.

Kind regards and thanks in advance from germany

Patrick


Answers:
author: Thomas Schlegel
body: Do you know User Macros? Here is a small user macro, providing a google search field:

```
## @param 0:title=L?nge des Eingabefeldes|type=enum|enumValues=short-field,medium-field,medium-long-field,long-field,full-width-field|default=long-field

<form action="http://www.google.com/search" class="aui" method="get" name="searchform" target="_blank">
<input autocomplete="on" class="text $param0" name="q" placeholder="Suche in Google" required="required" type="text">
</form>
```

Save this as a new user macro and put it on your page.

comments: author: Patrick Voulli?
body: Thats more than I could have asked for. Thanks a lot Thomas - works fine.


author: Thomas Schlegel
body: That's great, [@Patrick Voulli?](/t5/user/viewprofilepage/user-id/1221656), you're welcome.

If you think, your question is answered, please accept the answer with the checksign. With such a marker, other users with similar topics can find answered questions more easy.

Viele Gr??e aus Hamburg


author: Patrick Voulli?
body: Thomas I dont want to overextend your helpfullness, but i have an additional question.

Is there a way to use your macro for Googlemaps search? I dont need that fancy solution with an embed map - the simple search bar with an extra tab opening showing the location I was looking for is more than enough.

Viele Gr??e nach Hamburg :)


author: Thomas Schlegel
body: There's a free app for that purpose:

<https://marketplace.atlassian.com/plugins/com.pkrete.embed-google-map/server/overview>

But I haven't tested that app yet.


author: Thomas Schlegel
body: There's a second one:

<https://marketplace.atlassian.com/plugins/org.techtime.confluence.plugins.googlemapsembed/server/overview>


author: Patrick Voulli?
body: Thanks Thomas. Unfortunatelly Both Apps do not provide a searchbar.


author: Thomas Schlegel
body: Hi Patrick,

you can easily change the action-url in the example to "[http://www.google.de/maps/place"](http://www.google.de/maps/place"?)

But, please read the google guidelines carefully. I remember discussions about licensing google maps in a commercial environment.


author: Werner Weber
body: Hi Thomas

Thanks for the Macro. As I'm not familiar with coding: Is there a way to use the title of a page as the input for the search bar?

cheers from Switzerland


author: Thomas Schlegel
body: Hi Patrick,

do you have Confluence Cloud or Server? The search functionality and user interface between these two are different, that's why I'm asking.

comments: author: Patrick Voulli?
body: Hi Thomas,

thank you for your fast reply. We are using Confluence on our Server.


author: Thomas Schlegel
body: Good. Of course, you have seen then the search field in the title bar. This is the main search functionality of Confluence. If you click in that field, you see your page history and if you type a fulltext search will be executed.

There is also a macro, you can use on your dashboard page. It is called "livesearch" or "Livesuche" in German. This macro can be parametrized, so that is only searching in certain spaces or pages with certain labels etc.

It looks like that:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/19525iF8F9E18B38BA5B6E/image-size/large?v=v2&px=999 "image.png")There are also other apps on the marketplace for Confluence searching, but we don't use any of them:

[https://marketplace.atlassian.com/search?product=confluence\&query=search](https://marketplace.atlassian.com/search?product=confluence&query=search)

You have to try.


author: Patrick Voulli?
body: Thank you Thomas, we will give it a try. Just to clarifiy my question: We want to search the web with Google like we usually do. This is not about searching in our Confluence-Database.

I'am probably looking for something like a Google-Search-Wiget.


author: Thomas Schlegel
body: Ah, ok, then I have totally misunderstood your question, I'm sorry.


author: Patrick Voulli?
body: No Problem. :)

I found a few tutorials reffering to "Google Custom Search" - but this is again about searching your webpage content. Still looking for an easy and convenient way to add the standard Google Search Bar to our Space.


author: Kateryna Novozhylova
body: Hello, Patrick!

I've faced the same need to add the Google Search Bar to our spaces on the Confluence server.

I am wondering whether you have found any solution. It would be extremely helpful if you could share your ideas. Thanks!