Closed
Bug 1066816
Opened 10 years ago
Closed 10 years ago
Allow OT toolkit to set GUID for analytics
Categories
(Hello (Loop) :: Client, defect)
Hello (Loop)
Client
Tracking
(firefox34 fixed, firefox35 fixed)
RESOLVED
FIXED
mozilla35
People
(Reporter: abr, Assigned: abr)
References
Details
Attachments
(1 file, 1 obsolete file)
2.88 KB,
patch
|
standard8
:
review+
lmandel
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
As discussed in Bug 1033587 comment 3, an ongoing source of pain for TokBox is
the inability to get clean analytics for the desktop client due to the absence
of origins in the context that Loop runs. The latest OpenTok library (2.2.9;
see Bug 1066219) incorporates a new API explicitly designed to address this
situation. We need a small bit of glue on our side to attach this new API to a
persistent data store.
Assignee | ||
Comment 1•10 years ago
|
||
Patch to store OpenTok client GUIDs in a "loop.ot.guid" string pref
Attachment #8488821 -
Flags: review?(standard8)
OT2.2.9 should resolve this issue. Here's some information about modifying GUID:
OT.overrideGuidStorage(storageInterface)
Assigns the object storageInterface as the storage interface for the entire framework.
storageInterface must implement get and set methods to be valid. If storageInterface is invalid then it will be rejected and an exception will be raised.
Storage Interface
A valid Storage Interface implements set and get methods.
set(guid, completionHandler) set takes the guid to set and a function (completionHandler) to call when the set succeeds or fails. The signature of completionHandler is function(error), where erroris Null if no error occurred or a String.
get(completionHandler) get takes a function (completionHandler) to call when the guid is either retrieved or an error occurs. The signature of completionHandler is function(error, guid). error is Null if no error occurred or a String. guid is a string representing the retrieved Guid.
Usage
// Implement our default storage mechanism, which sets/gets a cookie
// called 'opentok_client_id'
OT.overrideGuidStorage({
get: function(completion) {
completion(null, OT.$.getCookie('opentok_client_id'));
},
set: function(guid, completion) {
OT.$.setCookie('opentok_client_id', guid);
completion(null);
}
});
// Implement a more complicated storage mechanism
var ComplexStorage = function() {
// Do a bunch of complex stuff, track internal state, etc
// expose get and set APIs
this.set = function(guid, completion) {
AwesomeBackendService.set(guid, function(response) {
completion(response.error || null);
});
};
this.get = function(completion) {
AwesomeBackendService.get(function(response, guid) {
completion(response.error || null, guid);
});
};
};
OT.overrideGuidStorage(new ComplexStorage());
Comment 3•10 years ago
|
||
Comment on attachment 8488821 [details] [diff] [review]
Allow OT toolkit to set GUID for analytics
Review of attachment 8488821 [details] [diff] [review]:
-----------------------------------------------------------------
r=Standard8 with the comment extended.
::: browser/components/loop/content/js/conversation.jsx
@@ +409,5 @@
> // Do the initial L10n setup, we do this before anything
> // else to ensure the L10n environment is setup correctly.
> mozL10n.initialize(navigator.mozLoop);
>
> + // Plug in an alternate client ID mechanism
Lets just extend the comment slightly:
"... as localStorage and cookies don't work in the conversation window"
Attachment #8488821 -
Flags: review?(standard8) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Assignee | ||
Comment 6•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8488821 -
Attachment is obsolete: true
Assignee | ||
Comment 7•10 years ago
|
||
This should fix the tree burn issue -- checking to make double-sure:
https://tbpl.mozilla.org/?tree=Try&rev=ca80038a0035
Assignee | ||
Comment 8•10 years ago
|
||
Comment on attachment 8493373 [details] [diff] [review]
Allow OT toolkit to set GUID for analytics
Now checks for OT object (and appropriate method) so we don't hose the unit tests.
Attachment #8493373 -
Flags: review?(standard8)
Comment 9•10 years ago
|
||
Comment on attachment 8493373 [details] [diff] [review]
Allow OT toolkit to set GUID for analytics
So normally we stub in the tests rather than the code, but I looked at this earlier and it is indeed difficult to stub with the way it is.
I therefore think we should leave it as you've got it, and we can improve it later.
Attachment #8493373 -
Flags: review?(standard8) → review+
Assignee | ||
Comment 10•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Comment 12•10 years ago
|
||
Deprioritizing this for QE verification. Please needinfo me to request testing.
Flags: qe-verify-
Comment 13•10 years ago
|
||
Comment on attachment 8493373 [details] [diff] [review]
Allow OT toolkit to set GUID for analytics
Approval Request Comment
Uplift request for patches staged and tested on Fig
Attachment #8493373 -
Flags: approval-mozilla-aurora?
Comment 14•10 years ago
|
||
Updated•10 years ago
|
status-firefox34:
--- → fixed
status-firefox35:
--- → fixed
Comment 15•10 years ago
|
||
Comment on attachment 8493373 [details] [diff] [review]
Allow OT toolkit to set GUID for analytics
I worked with Randell and Maire on uplifting a large number of Loop bugs at once. All of the bugs have been staged on Fig and tested by QE before uplift to Aurora. As well, all of the bugs are isolated to the Loop client. Randell handled the uplift with my approval. I am adding approval to the bug after the fact for bookkeeping.
Attachment #8493373 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in
before you can comment on or make changes to this bug.
Description
•