Subversion Repositories SmartDukaan

Rev

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

Rev 12062 Rev 12524
Line 245... Line 245...
245
        {
245
        {
246
          
246
          
247
          data = JSON.parse(res);
247
          data = JSON.parse(res);
248
          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
248
          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
249
            //window.history.replaceState("",document.title, base_url+'cart');
249
            //window.history.replaceState("",document.title, base_url+'cart');
250
            if(typeof _gaq != "undefined" && _gaq != null)  {
250
            /*if(typeof _gaq != "undefined" && _gaq != null)  {
251
              _gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);
251
              _gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);
252
            }
252
            }*/
-
 
253
	ga('send', 'event', 'Order', 'Add To Cart',itemId);
253
            var ua = navigator.userAgent.toLowerCase();
254
            var ua = navigator.userAgent.toLowerCase();
254
            var redirectUrl = data['addcart'][0].redirectUrl;
255
            var redirectUrl = data['addcart'][0].redirectUrl;
255
            var isIE = ua.indexOf('msie') !== -1;
256
            var isIE = ua.indexOf('msie') !== -1;
256
            if (isIE){
257
            if (isIE){
257
              window.location.replace(base_url+redirectUrl);
258
              window.location.replace(base_url+redirectUrl);
Line 274... Line 275...
274
    document.getElementById('error').style.display = "none";
275
    document.getElementById('error').style.display = "none";
275
  }
276
  }
276
}
277
}
277
function trackAccessories(title){
278
function trackAccessories(title){
278
 
279
 
279
if(typeof _gaq != "undefined" && _gaq != null)  {
280
/*if(typeof _gaq != "undefined" && _gaq != null)  {
280
    _gaq.push(['_trackEvent', 'Widget', 'Accessory Click', title]);
281
    _gaq.push(['_trackEvent', 'Widget', 'Accessory Click', title]);
281
  }
282
  }*/
-
 
283
	ga('send', 'event', 'Widget', 'Accessory Click',title);
282
}
284
}