Pardot Knowledge Base

Integrating Third-Party Search

Last Updated: Apr 26, 2016 | Print this Article
 
To create a third-party site search, follow the steps listed below. Please note site search content from the page source may vary; these are general guidelines. If you are integrating a Google Site Search, see this article.

Step 1: Name

  1. Navigate to Marketing > Site Search.
  2. Click + Add Site Search.
  3. Enter a Name. This is internal-only.
  4. Optional: add Tags.
  5. Click Next.
The next section will walk you through setting up your redirect URL.

Step 1a: Redirect URL

Test your third-party site search form and use the set of instructions that matches the URL for your search results page.

Redirect URL: for URLs in the format
http://www.site.com?q=search_term
  1. Enter the Redirect URL for your third-party search application. You can find this URL by searching for the ‘form action=’ in the page source.
  2. Select a Submit Method, either POST or GET, depending on your application. This will generally match the ‘method=’ in the page source.
  3. From the company’s website, complete a search for any word in their search bar. Make note of the query parameter between the ‘?’ and the first ‘=’ in the URL of the search results page.
  4. Enter the query parameter into Search Query Variable.
  5. Click Next.
Third Party Search Redirect URL

Redirect URL: for URLs in the format
http://www.site.com/example/example/search_term/word/%3834&$/word
  1. Enter the Redirect URL for your third-party search application. You can find this URL by searching for the ‘form action=’ in the page source.
  2. Select a Submit Method, either POST or GET, depending on your application. This will generally match the ‘method=’ in the page source.
  3. Insert the Search Query Variable. This is the query parameter from your third-party application. It can be found in your Form as the value for the Name attribute.
  4. Click Next.
Redirect URL: for URLs in the format
http://www.site.com/example/words/search_term
  1. Enter the Redirect URL for your third-party search application. You can find this URL by searching for the ‘form action=’ in the page source. You will need to append {query} to the end of this URL like this: http://www.site.com/example/words/{query}
  2. Select a Submit Method, either POST or GET, depending on your application. This will generally match the ‘method=’ in the page source.
  3. Insert the Search Query Variable. This is the query parameter from your third-party application. It can be found in your Form as the value for the Name attribute.
  4. Click Next.

Step 2: Review

  1. Review your selections on the confirmation page.
  2. Click Next.

Step 3: HTML Code

  1. Copy the Post URL from Pardot. Post Url
  2. Edit your company's web page's HTML and change the site search form’s action URL (action=”URL”) to the Pardot Post URL you just copied. When a user clicks the submit button, the search query is first passed to Pardot, where we record the search term, and then the request is forwarded back to the redirect URL specified in the wizard so that the user sees the search results page.Search Action URL
  3. Click Confirm & Save in the Site Search Wizard
  4. To test, after you have updated the form's action URL (action=”URL”) to be the Pardot Post URL, submit a search request on your website. Then refresh the Pardot site search page and you can see the search term generated in the right column.
NOTE: If your website is HTTP Secure (URLs start with 'https' instead of 'http'), you will need to replace the CNAME (http://cname.yourdomain.com) portion of the Pardot Post URL with https://go.pardot.com. See How to SSL-enable (HTTP Secure) Pardot URLs for more details.

Posting data to hidden iframes

If updating your site search form's action URL (action=”URL”) is not possible or the preferred method, an alternative advanced option is posting the search term data to a hidden iframe on the results page. For more details on posting data to hidden iframes click here.

Integrating Site Search with WordPress

If you're integrating a third-party site search with Pardot and a WordPress site, you'll need to take an extra step in WordPress. See Integrating Pardot with WordPress for instructions.

Site Search Reporting

Once integrated, Pardot can report on your third-party site search. See Site Search Reporting for more information.  

Need more? Start a conversation with other Pardot users in our Success Community