Google Analytics Plugin

I am trying to update the GoogleAnalytics.pm file so that it can match the new format that google has pushed out. I have everything except one piece. I need to know how to populate the domainname field. I have tried to use dom, DOM, $DOM, and $virt. Every time I submit my change, the plugin brings down my webserver. I just need to know where this entry is. Thanks!

Status: 
Closed (duplicate)

Comments

I wasn't aware the domain name was required in the javascript .. where is this documented?

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '$account']);
  _gaq.push(['_setDomainName', '.domain.com']);
  _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>

What you have is correct for single sites. Above is the code if you have multiple subdomains. Below is if you have several top level domains.

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '$account']);
  _gaq.push(['_setDomainName', 'none']);
  _gaq.push(['_setAllowLinker', true]);
  _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>