From 1a38a361bee1395ee2168cf7869d2354821da14e Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Thu, 6 Jul 2017 01:07:29 -0400 Subject: [PATCH] Disabled client-side tracking if Segment ID is empty Tracking is now disabled if the Segment application ID is set to an empty string (e.g. the default for local development). LEARNER-1668 --- ecommerce/static/js/models/tracking_model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecommerce/static/js/models/tracking_model.js b/ecommerce/static/js/models/tracking_model.js index 61982283a7d..04d3e20aea4 100644 --- a/ecommerce/static/js/models/tracking_model.js +++ b/ecommerce/static/js/models/tracking_model.js @@ -12,7 +12,7 @@ define(['backbone', 'underscore'], function(Backbone, _) { isTracking: function() { var self = this, trackId = self.get('segmentApplicationId'); - return !_(trackId).isUndefined() && !_(trackId).isNull(); + return !_(trackId).isUndefined() && !_(trackId).isNull() && !_(trackId).isEmpty(); } }); });