Best way is to access piwik like this http://megahosting.co.nz/admin/piwik/ and go to Settings->Website and click on View Tracking code then the trackingcode will be good.
This has nothing to do with Piwik but how your server is configured. In your case it works but on a shared host with shared IP it probably won’t work. Still I don’t really see why you don’t want to have the domainname in your script.
Yea i dont mind having the domain name in there. Im just having heaps of problems with dns propogation at the moment and the domain name keeps disappearing
But then i guess without my domain name, no one can reach the site anyway
ps. If anyone could help me with this propogation problem that would be great