Skip to main content
3 of 3
added tags, removed "thanks", rewrite title, use example.com
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

Capturing site search parameters from the URL hash in Google Analytics

We want to capture aggregated, anonymous search query history for analytic purposes to improve our internal search engine performance and metadata practices.

I found this article: https://support.google.com/analytics/answer/1012264?hl=en

Unfortunately, our search engine uses a hash tag instead of a question mark (nonstandard query string).

For example: http://www.example.com/search#q=search%20term

Is there a way to configure Google Analytics to recognize hash tag values in the URLs and capture these given a defined pattern?