homepage Welcome to WebmasterWorld Guest from 54.167.238.60
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

    
Race Conditions tracking mailto links, GA
Does settimeout help
moehits




msg:4523285
 5:06 pm on Nov 28, 2012 (gmt 0)


Hi,

I setup event tracking for mailto links and it seems there's a race condition for the click being recorded.

I added a setTimeout of 100ms to the link, but it doesn't seem to be helping, I don't want to up the time too much, but I might try it.

Is there a better solution?

Here's the code if it helps to find a solution.

<a href="mailto:sales@acme.com?subject=Sales" onClick="setTimeout(_gaq.push(['_trackEvent', 'Contact-Sales', 'Email Link', 'Email Sales', 1]),100;">sales@acme.com</a><br>

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved