w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Google event tracking not working with new style tracking code
You have two problems: The classic style with _gaq is not interchangeable with the new universal analytics, you will be using ga('send','event', param1, param2...). If you track an event on click with the classic style code, its unlikely the event will be reported before the page is unloaded. If you set this up correctly with the universal code, it will work fine.

Categories : Google Analytics

Google Analytics Event Tracking Transition to Universal Tracking
Just update your function to send to Universal Analytics as well. function recordOutboundLink(link, category, action, label) { _gat._getTrackerByName()._trackEvent(category, action, label); ga('send', 'event', category, action, label); setTimeout('document.location = "' + link.href + '"', 100); }

Categories : Javascript

Google Analytics - event tracking code in separate