Wednesday, 15 September 2010

javascript - Google Analytics Event Tracking using Jquery not working -



javascript - Google Analytics Event Tracking using Jquery not working -

i trying track click events faq's. when user clicks question expands changing icon form plus minus. want expand event tracked see questions user has clicked most. not working, kindly review , give suggestions how prepare it. give thanks you.

$(document).ready(function() { $('.question').toggle( function() { $(this).next().show('slow'); $(this).css('background- image','url(/telenorsharedservices/en/tools/ithelp/tss%20support/publishingimages/icon-minus.gif)'); var question = $(this).text(); gatracking(question); }, function() { $(this).next().hide('slow'); $(this).css('background-image','url(/telenorsharedservices/en/tools/ithelp/tss%20support/publishingimages/icon-plus.gif)'); } ); }); function gatracking(question) { seek { _gaq.push(['_trackevent','faq','expand',question]); } catch(err){ alert(err); } }

javascript jquery

No comments:

Post a Comment