Track Drupal Site Search in Google Analytics
Google Analytics has a feature to track Site Search. It must be configured with a "Query Parameter". Setting this up was a little confusing to me, so I thought I'd post here to help anyone who may be stuck.
To track Drupal's default search, located at
www.example.com/search, do the following steps:
1. Click the "Edit" link on the site profile.
2. Click "Edit" next to Main Website Profile Information.
3. Under "Site Search", enter the following parameters:
I don't believe you have to strip query parameters out of the URL, it won't garble the results.
For the "Query Parameter", if you want to track Drupal's default search, just enter "search" as the query parameter.
To also capture those search results, simply add "search/apachesolr_search" or "search/multisite_search" to the query parameter with a comma.
So the query parameter will appear like so:
That's it! It worked for me, so hopefully it will for you too...