Browse files

Merge pull request #41 from johnpaulashenfelter/patch-1

Only add setDomainName if the :domain key is set, just like allowLinker....
  • Loading branch information...
2 parents 58aa38d + 7ce0de1 commit bf835497014a8f3c8fc21800cf1925974f0817a4 @jkrall committed Jul 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/analytical/modules/google.rb
View
2 lib/analytical/modules/google.rb
@@ -15,7 +15,7 @@ def init_javascript(location)
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '#{options[:key]}']);
- _gaq.push(['_setDomainName', '#{options[:domain]}']);
+ #{"_gaq.push(['_setDomainName', '#{options[:domain]}']);" if options[:domain]}
#{"_gaq.push(['_setAllowLinker', true]);" if options[:allow_linker]}
_gaq.push(['_trackPageview']);
(function() {

0 comments on commit bf83549

Please sign in to comment.