As Gabriel said. I found this explanation from GA:
Hostname
This is the hostname or domain that visitors used to reach your site. Typically this is your site's domain. For example, if you host your blog on mysite.example.com, then your hostname report will contain mysite.example.com. In some cases, your website might be hosted on other domains, such as when you create a mirror (copy) of your site to host on a domain in another country (e.g. mysite.example.uk). In addition, if someone copies a page from your website directly without modifying any of the source code (including the tracking code) and places that page on their own website, your reports will reflect traffic to that page from that hostname as well. You can use profile filters to ensure that traffic only from allowed hosts reaches your reports.
Another Solution is to add a PhP Code:
<?php
// gets the actual environment root URL
$url = JURI::root();
// see if is in production environment and, if so, echoes the analytics' script tag
if (strpos($url, "www.productionenvironment.com") !== false) {
?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-Y']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<?php
}
?>
Personally I prefer Gabriel's solution as it saves additional code from the website.