There are three parts to integrating Google Site Search with Pardot on your site. You'll need to create the search engine, configure a site search in Pardot, then add the code to your website. In this article, we will walk you through getting your custom search set up and running.
Note: Pardot integrates with Google Site Search (the paid version). Visit Google's documentation about the difference between Google Site Search and Custom Search Engine to learn more.
]Note: It's a good idea to get your IT folks involved with this -- you'll need access to your organization's Google Custom Search Control Panel and your website's HTML in order to integrate Google Site Search.
Creating the search engine
- In Google's Custom Search Engine Control Panel, create your Google search engine. Be sure to choose the appropriate search box layout at this stage. You can find a great tutorial for creating search engines here.
- Copy your search engine's public URL.
Adding a site search in Pardot
- In Pardot, navigate to Marketing > Site Search > + Add Site Search.
- Enter a Name for this search.
- Optional: Enter Tags.
- Click Next.
- In Redirect URL, paste the google public URL for your search engine.
- Select GET from the Submit Method dropdown.
- Enter your search variable in Search Query Variable. Note: this variable must match the search variable in your Google site search code. Using q is very common.
- Click Next.
- When finished reviewing your site search, click Next.
- Copy the Post URL (you'll need this if you're using a search box layout that displays results on another page or frame).
- Click Confirm & Save when finished.
Adding the search box to your site
- In your Custom Search Engine Dashboard get the code for your search engine. You can find help with this here.
- On your website, paste the code into a <div> element inside of your <body> section. It will look something like this (depending on the layout you choose):
<gcse:searchbox-only resultsUrl="YOUR_PARDOT_POST_URL"></gcse:searchbox-only>Your site search is now set up! Pardot can report queries, the prospect or visitor that made them, along with a date and timestamp.
If you need more help setting up your Google Site Search, please see these Google resources:
Custom Search -- Implementing search box
Custom Search Help Center
Not what you're looking for? Check out these other articles:
Site Search Overview
Site Search Report
Integrating Pardot with WordPress