Closed Bug 743822 Opened 13 years ago Closed 13 years ago

Add Impressions Handling To Snippet Admin Interface

Categories

(Snippets :: Service, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bensternthal, Assigned: osmose)

References

Details

This bug captures the additions needed to the django admin to enable impressions tracking.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Mike, mind posting explicit instructions here on how to test it, based on https://romana.etherpad.mozilla.org/2012-04-06-Snippet-Weekly ? Thanks!
OS: Mac OS X → All
Hardware: x86 → All
So here's how we ended up doing tracking: - All snippets are tracked. - No admin interface mucking is needed to track a snippet. - Code samples at 1% (flag to disable sampling not yet implemented) What we should test: - Test that all snippets are surrounded by a <div> with a data-snippet-id attribute storing their snippet ID. - Test that a POST request is sent to the snippets statistics server with the locale the browser is set to and the correct ID in the snippet_name argument. URL Format: https://snippets-stats.mozilla.org/foo.html?locale=en-US&snippet_name=2974 Locale Switching Addon: https://addons.mozilla.org/en-US/firefox/addon/quick-locale-switcher/ - Test that, with sampling enabled, that a request is only sent to the server roughly 1% of the time (this doesn't really have to be accurate and is fairly explicit in the code, but if we want to be thorough :P) Some of these aren't easily automatable. Perhaps we should just test these manually for the snippets impressions release, and then focus on automation strategy? I can send credentials for logging into the stage admin interface and provide instruction on how to use it if anyone needs it, by the way.
Also, if we are just doing manual tests, let me know and I can modify the sampling live to help testing, and we can add on the flag for automated testing later.
(In reply to Michael Kelly [:mkelly] from comment #4) > Also, if we are just doing manual tests, let me know and I can modify the > sampling live to help testing, and we can add on the flag for automated > testing later. Let's do manual testing for now; we've resurrected the production tests, but won't have time to complete the rest of the automation for the new enhancements.
You need to log in before you can comment on or make changes to this bug.