Closed (fixed)
Project:
Apache Solr Search
Version:
5.x-1.0-alpha3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2008 at 03:22 UTC
Updated:
21 Sep 2008 at 12:52 UTC
Jump to comment: Most recent file
Comments
Comment #1
JacobSingh commentedhi drupalnuts:
This is in fact pretty stupid on the part of google analytics...
You can of course add a redirect in your htaccess, or write some code in a custom module to redirect the request. I'm sure it is useful for everyone, but I don't think we should break convention here with standard drupal search to support it by default. Also, I think you are right, it's more of general feature to not use clean urls on a given page than it is an apachesolr issue...
Perhaps do some research / asking around to see if this functionality could be supported generically. If you find anything, please update this ticket, and I can put it in the FAQ.
Best,
Jacob
Comment #2
janusman commentedI *think* you can use the Google Analytics API: http://code.google.com/apis/analytics/docs/eventTrackerGuide.html
However, I don't think you can tell GA via the API to put data into the existing 'site search' part; but you can either track the Apache Solr search separately as an event, or as a page load.
For now I think you can use either of these functions in the GA API:
I am going to try both approaches and see which work best.... I came up with this code to add to apachesolr_search.module-- and although no javascript errors are showing, and the data seems to be sent to Google, at least for now the data doesn't show up in my Analytics reports.
I going to trying to "fool" GA with fake pageviews for an URL that DOES have a '?q=' part in it, to see if that makes the data show in site search.
Comment #3
robertdouglass commentedYou could also make the rewrite rule in .htaccess conditional to not apply on /search. I'll leave active until people have concluded research, but I see this issue as a "won't fix" in terms of the project.
Comment #4
janusman commentedI can report that my additional javascript works... details:
So this works, but thinking over it this code might be best as an additional module (apachesolr/contrib/apacehsolr_googleanalytics , anyone?) and where I put it =) Maybe this should require /work with the Google Analytics Drupal module. ... up for grabs.
Comment #5
robertdouglass commentedHave you seen this? http://stupendousamazing.blogspot.com/2008/09/using-google-analytics-to-...
Comment #6
robertdouglass commentedMarking as fixed. If someone wants to write a dedicated google analytics plugin for ApacheSolr, go ahead, but start a new issue.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.