I help some of my clients track their site usage by having them insert a little bit of JavaScript code into their header or footer page. I recently had a client tell me he's using Wordpress and "they don't allow scripts". I know nothing about Wordpress as I've never used it. Below is the code I'd like for him to install (modified a bit for brevity and security):
<div>
<script>
var wandTopSitesUserId = 28;
document.cookie = 'SiteMetrics=' + wandTopSitesUserId + '; expires=Tue, 1 Jan 2030 00:00:00 UTC; path=/';
document.write('<div><a href="http://www.xyxyxyx.com/"><img src="http://www.xyxyxyx.com/Log/LogVisit/?siteId=28&userId=' + wandTopSitesUserId + '&pageName=' + location.pathname + '&userAgent=' + navigator.userAgent + '" alt="Site Metrics" /></a></div>');
</script>
</div>
The actual code above isn't that important. I just need to know if there is there anything special Wordpress users need to do to install this code?
Also, the user is using Wordpress.com and not Wordpress.org