Google Analystics Event Tracking Using Jquery click function -
i'm attempting call google analytics _trackevent asynchronously inside function.
$('.buybtn_2').click(function() { if ($('.buybtn_2').html() == 'add cart') { addcartquote(quoteid); $('.buybtn_2').html('checkout >'); $('.quantity_2').html('<span class="warningsmall">project added</span>').fadeout(1500); _gaq.push(['_trackevent', 'parts', 'add cart', 'in stock', qtyselected]); } else { var goto = '/cart/cartlist.php'; window.location = goto; } return false; });
the track event doesn't appear firing. if take same exact code , wrap doc ready works fine see fire in firefox console. think scope issue i'm not dealing properly?
Comments
Post a Comment