From 074820d770b2cdb0ac484266dbfb92ccc7490306 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 1 Jun 2014 21:49:29 -0700 Subject: [PATCH] Tracking bugfix, annotation fixes. --- static/cosmopolite.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/static/cosmopolite.js b/static/cosmopolite.js index 42eca60..9c1878c 100644 --- a/static/cosmopolite.js +++ b/static/cosmopolite.js @@ -95,7 +95,10 @@ var Cosmopolite = function( localStorage[this.namespace_ + ':client_id'] = this.uuid_(); } - /** @type {string} */ + /** + * @type {string} + * @private + */ this.instanceID_ = this.uuid_(); /** @@ -154,7 +157,7 @@ var Cosmopolite = function( window[this.analyticsObjName_] = { 'l': 1 * new Date(), - 'q': [], + 'q': [] }; var script = document.createElement('script'); @@ -171,7 +174,7 @@ var Cosmopolite = function( localStorage[this.namespace_ + ':tracking_client_id'] = analytics.get('clientId'); }).bind(this)); - this.trackeEvent('send', 'event', 'cosmopolite', 'load'); + this.trackEvent('send', 'event', 'cosmopolite', 'load'); } this.registerMessageHandlers_(); @@ -338,7 +341,7 @@ Cosmopolite.prototype.subscribe = function(subject, opt_messages, opt_last_id) { } resolve(); this.trackEvent( - 'send', 'event', 'cosmopolite', 'subscribe', subjectString); + 'send', 'event', 'cosmopolite', 'subscribe', subjectString); } else { delete this.subscriptions_[subjectString]; reject(); @@ -531,9 +534,9 @@ Cosmopolite.prototype.unpin = function(id) { /** * Log an event to analytics. * - * @param {...[string]} + * @param {...*} var_args */ -Cosmopolite.prototype.trackEvent = function() { +Cosmopolite.prototype.trackEvent = function(var_args) { if (this.analyticsObj_) { this.analyticsObj_.apply(this, arguments); } else if (this.analyticsObjName_) {