Skip to content

Commit

Permalink
send telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed Dec 5, 2016
1 parent a20a257 commit c078d7f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/core/web_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ class Auth0WebAPI {
this.clients[lockID] = new auth0.WebAuth({
clientID: clientID,
domain: domain,
_sendTelemetry: true,
redirectUri: opts.redirectUrl,
responseMode: opts.responseMode,
responseType: opts.responseType
responseType: opts.responseType,
_sendTelemetry: Auth0Lock.sendClientInfo,
_telemetryInfo: {
...Auth0Lock.clientInfo,
lib_version: auth0.version
}
});

this.authOpts[lockID] = {
Expand Down
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export default class Auth0Lock extends Core {
}

// telemetry
// Auth0Lock.version = __VERSION__;
// Auth0Lock.css = css;
// Auth0.clientInfo = {};
// Auth0.clientInfo.lib_version = Auth0.version;
// Auth0.clientInfo.name = "lock.js";
// Auth0.clientInfo.version = Auth0Lock.version;
Auth0Lock.version = __VERSION__;
Auth0Lock.css = css;
Auth0Lock.sendClientInfo = true;
Auth0Lock.clientInfo = {};
Auth0Lock.clientInfo.name = "lock.js";
Auth0Lock.clientInfo.version = Auth0Lock.version;

// TODO: should we have different telemetry for classic/passwordless?
// TODO: should we set telemetry info before each request?
Expand Down

0 comments on commit c078d7f

Please sign in to comment.