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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -