Jump to content

Add Analytics into generated email link with document.write


jarvis

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.