jarvis Posted November 11, 2011 Share Posted November 11, 2011 Hi, Am totally useless with javascript! So hope someone can help. I'm using Dynamic Drive Email Riddler so conceal an email address. I therefore have this code to show the email on my page: <script type="text/javascript">document.write('<a href="mailto:'+encryptedemail_id85+'" title="'+encryptedemail_id85+'">'+encryptedemail_id85+'</a>')</script> But how do I add: onclick="pageTracker._trackEvent('Email', 'Global', 'Header Panel');" As soon as I add it in, it breaks it. Am very embarassed as I'm sure it's very easy. Any help is much appreciated! Thanks Quote Link to comment https://forums.phpfreaks.com/topic/250923-add-analytics-into-generated-email-link-with-documentwrite/ Share on other sites More sharing options...
nogray Posted November 11, 2011 Share Posted November 11, 2011 You need to escape your single quotes onclick="pageTracker._trackEvent(\'Email\', \'Global\', \'Header Panel\');" Quote Link to comment https://forums.phpfreaks.com/topic/250923-add-analytics-into-generated-email-link-with-documentwrite/#findComment-1287428 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.