Closed
Bug 743822
Opened 13 years ago
Closed 13 years ago
Add Impressions Handling To Snippet Admin Interface
Categories
(Snippets :: Service, defect)
Snippets
Service
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.
Assignee | ||
Comment 1•13 years ago
|
||
The changes needed were added in https://github.com/mozilla/home-snippets-server/commit/2ff5ad1cc14eaefe72237fb4819570ca9781c52a
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 2•13 years ago
|
||
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
Assignee | ||
Comment 3•13 years ago
|
||
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.
Assignee | ||
Comment 4•13 years ago
|
||
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.
Comment 5•13 years ago
|
||
(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.
Comment 6•13 years ago
|
||
Looking good; hitting:
[19:06:08.252] POST https://snippets-stats.mozilla.org/foo.html?locale=en-US&snippet_name=2974 [HTTP/1.1 200 OK 670ms]
Request URL is https://snippets-stats.mozilla.org/foo.html?locale=en-US&snippet_name=2974
You need to log in
before you can comment on or make changes to this bug.
Description
•