onclick tracking on links with a rotating image carousel

I've been trying to add onclick tracking to my homepage carousel links, my CMS does not allow inline tracking, so I have been trying to do this using jQuery (code here):

http://jsfiddle.net/greenhulk01/LRp39/

I basically thought I could add the tracking code with jQuery to every link within an unordered list.

The problem I have is that in Google Analytics under Event tracking every link appears as being tracked other than the ones within the content blocks (class="home-page-slideshow-infopanel") of my rotating carousel block on my site's homepage: http://www.goodwood.co.uk/home.aspx

(function($) {

$(document).ready(function(){ $("home-page-slideshow-infopanel-content a").click(function() { _gaq.push(['_trackEvent', 'Click', 'Homepage Promo Clicked', $(this).attr('title'),3]); }); $("a.golf-promo").click(function() { _gaq.push(['_trackEvent', 'Click', 'Golf Membership Homepage Promo clicked', $(this).html(),3]); }); }); })(jQuery);

Tried just tracking links within .home-page-slideshow-infopanel a but this doesn't work either.

Any suggestions would be really appreciated as I'm a bit stuck for ideas now.

Thank you.

链接地址: http://www.djcxy.com/p/12422.html

上一篇: 在整个调用堆栈被处理之前,window.location不会进行评估?

下一篇: 点击跟踪旋转图像轮播的链接