Closed Bug 959376 Opened 11 years ago Closed 11 years ago

Implement analytics middleware for super-search module


(Socorro :: Webapp, task)

Not set


(Not tracked)



(Reporter: lonnen, Assigned: adrian)


Our analytics aren't picking up any page views from search, and search doesn't seem to be getting the urchin. I think this is because super search is implemented as its own django-app and doesn't get the analytics injecting middleware.
I don't understand what's happening. The analytics JS is on the search page:

Could it be because that page uses AJAX all around to get results? Can we make something to tell Analytics that the page URL changed?
That'll do it. We can work around it with something similar to:

The urchin may have been updated since then, but there must be similar or equivalent techniques if its changes. I didn't look into it too deeply. We can also use this to track the in-page tab usage if we want.

We need to make sure we check for the existence of the analytics urchin before trying to interact with it. We don't want to degrade functionality for users running adblock or similar.
Pull request:

Thanks for the help :lonnen!
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → 73
Commits pushed to master at
Fixes bug 959376 - Track supersearch calls in Google Analytics.
Merge pull request #1819 from AdrianGaudebert/959376-supersearch-analytics

Fixes bug 959376 - Track supersearch calls in Google Analytics.
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: 73 → 72
You need to log in before you can comment on or make changes to this bug.