Onclick window.location.href will not work in Chrome or Safari

We have a download section, and we are trying to track when a user downloads something. The downloads are related as follows:

<a href="DOWNLOADURL" onclick="window.location.href='http://analytics.performable.com/v1/event?_n=EVENTID&_a=PORTALID&email=USEREMAIL'">TITLE OF DOWNLOAD</a>

It works fine in IE and FF, but not in Chrome (or in any web browser browser) or in Safari. I can live without a Safari, but it would be nice.

Any ideas?

+5
source share
1 answer

try the following:

<a href="DOWNLOADURL" onclick="javascript:window.location.href='http://analytics.performable.com/v1/event _n=EVENTID&_a=PORTALID&email=USEREMAIL'; return false;">TITLE OF DOWNLOAD</a>
+24
source

All Articles