Subversion Repositories SmartDukaan

Rev

Rev 10946 | Rev 11325 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10946 Rev 10953
Line 214... Line 214...
214
        {
214
        {
215
          debugger;
215
          debugger;
216
          data = JSON.parse(res);
216
          data = JSON.parse(res);
217
          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
217
          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
218
            //window.history.replaceState("",document.title, base_url+'cart');
218
            //window.history.replaceState("",document.title, base_url+'cart');
-
 
219
            if(typeof _gaq != "undefined" && _gaq != null)  {
219
            ga('send', 'event', 'Order', 'Add To Cart',itemId);
220
              _gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);
-
 
221
            }
220
            var ua = navigator.userAgent.toLowerCase();
222
            var ua = navigator.userAgent.toLowerCase();
221
            var redirectUrl = data['addcart'][0].redirectUrl;
223
            var redirectUrl = data['addcart'][0].redirectUrl;
222
            var isIE = ua.indexOf('msie') !== -1;
224
            var isIE = ua.indexOf('msie') !== -1;
223
            if (isIE){
225
            if (isIE){
224
              window.location.replace(base_url+redirectUrl);
226
              window.location.replace(base_url+redirectUrl);
Line 239... Line 241...
239
    document.getElementById('error').style.display = "none";
241
    document.getElementById('error').style.display = "none";
240
  }
242
  }
241
}
243
}
242
function trackAccessories(title){
244
function trackAccessories(title){
243
debugger;
245
debugger;
-
 
246
if(typeof _gaq != "undefined" && _gaq != null)  {
244
ga('send', 'event', 'Widget', 'Accessory Click', title);
247
    _gaq.push(['_trackEvent', 'Widget', 'Accessory Click', title]);
-
 
248
  }
245
}
249
}