Closed Bug 959376 Opened 11 years ago Closed 11 years ago

Implement analytics middleware for super-search module

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lonnen, Assigned: adrian)

Details

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: https://crash-stats.mozilla.com/search/

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: http://davidwalsh.name/ajax-analytics

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: https://github.com/mozilla/socorro/pull/1819

Thanks for the help :lonnen!
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → 73
Commits pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/22f4a8c90fb5658065fe5b2c5c28607a0408e904
Fixes bug 959376 - Track supersearch calls in Google Analytics.

https://github.com/mozilla/socorro/commit/bf29250a711ce8d6e92daafc320727c6369b45d4
Merge pull request #1819 from AdrianGaudebert/959376-supersearch-analytics

Fixes bug 959376 - Track supersearch calls in Google Analytics.
Status: NEW → RESOLVED
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.