Sun Jan 20, 2013 1:35 pm
<html>
<head>
<title>Follow clicks on hash links </title>
<!--
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
Note you can download the JQuery package instead of using Google version. -->
<script src="jquery-1.8.3.js"></script>
<script>
$(document).ready(function(){
//
// Track clicks on hash links using Google analytics.
function loadOnClick() {
$('a#hashLink').each(function(){
$(this).attr("onclick", "_gaq.push(['_trackPageview'," +
"location.pathname + location.search + jQuery(this).attr('rel')]);" );
});
}
loadOnClick();
});
</script>
</head>
<body>
</div>
<a href="#hash" rel="contact" id="hashLink" >Follow me.</a>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.