| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Subscribe and Support WebmasterWorld|
|Race Conditions tracking mailto links, GA|
Does settimeout help
| 5:06 pm on Nov 28, 2012 (gmt 0)|
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:email@example.com?subject=Sales" onClick="setTimeout(_gaq.push(['_trackEvent', 'Contact-Sales', 'Email Link', 'Email Sales', 1]),100;">firstname.lastname@example.org</a><br>
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved