Skip to main content
Clarifications and added a tag.
Source Link
dan
  • 15.2k
  • 11
  • 45
  • 52

Tracking subdomains in Google Analytics?

I set up a subdomain, and GAGoogle Analytics is showing traffic offor the subdomain.

However, going into Content section, GA is not showing pageviewspageviews of the pages of the subdomain. Instead, GA lumps all the pageviewspageviews in the subdomain.

I checked the code of subdomain pages, and they're all the same as the subdomain homepage.

Am I missing a dot somewhere?Here is my tracking code:

<script type='text/javascript'>try {
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-xxxxxxx-85']);
 _gaq.push(['_setDomainName', 'domain.org']); 
 _gaq.push(['_setAllowAnchor', true]); 
 _gaq.push(['_trackPageview', '/?scid=a2412a40-1b66-4e0a-a1d5-f5b260de6ee8']);
 _gaq.push(['b._setAccount', 'UA-xxxxxxx-56']);
 _gaq.push(['b._setDomainName', 'domain.org']);
 _gaq.push(['b._trackPageview']);
 } catch (err) {}
 (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>

Am I missing a dot somewhere?

Tracking subdomains in Google Analytics?

I set up a subdomain, and GA is showing traffic of the subdomain.

However, going into Content section, GA is not showing pageviews of the pages of the subdomain. Instead, GA lumps all the pageviews in the subdomain.

I checked the code of subdomain pages, and they're all the same as the subdomain homepage.

Am I missing a dot somewhere?

<script type='text/javascript'>try {
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-xxxxxxx-85']);
 _gaq.push(['_setDomainName', 'domain.org']); 
 _gaq.push(['_setAllowAnchor', true]); 
 _gaq.push(['_trackPageview', '/?scid=a2412a40-1b66-4e0a-a1d5-f5b260de6ee8']);
 _gaq.push(['b._setAccount', 'UA-xxxxxxx-56']);
 _gaq.push(['b._setDomainName', 'domain.org']);
 _gaq.push(['b._trackPageview']);
 } catch (err) {}
 (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>

Tracking subdomains in Google Analytics

I set up a subdomain and Google Analytics is showing traffic for the subdomain.

However, going into Content section, GA is not showing pageviews of the pages of the subdomain. Instead, GA lumps all the pageviews in the subdomain.

I checked the code of subdomain pages, and they're all the same as the subdomain homepage.

Here is my tracking code:

<script type='text/javascript'>try {
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-xxxxxxx-85']);
 _gaq.push(['_setDomainName', 'domain.org']); 
 _gaq.push(['_setAllowAnchor', true]); 
 _gaq.push(['_trackPageview', '/?scid=a2412a40-1b66-4e0a-a1d5-f5b260de6ee8']);
 _gaq.push(['b._setAccount', 'UA-xxxxxxx-56']);
 _gaq.push(['b._setDomainName', 'domain.org']);
 _gaq.push(['b._trackPageview']);
 } catch (err) {}
 (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>

Am I missing a dot somewhere?

Tweeted twitter.com/#!/StackWebmasters/status/372945455967404032
Formatting + changed tags
Link
Zistoloen
  • 10k
  • 6
  • 36
  • 59

Tracking Subdomainssubdomains in GAGoogle Analytics?

Source Link

Tracking Subdomains in GA

I set up a subdomain, and GA is showing traffic of the subdomain.

However, going into Content section, GA is not showing pageviews of the pages of the subdomain. Instead, GA lumps all the pageviews in the subdomain.

I checked the code of subdomain pages, and they're all the same as the subdomain homepage.

Am I missing a dot somewhere?

<script type='text/javascript'>try {
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-xxxxxxx-85']);
 _gaq.push(['_setDomainName', 'domain.org']); 
 _gaq.push(['_setAllowAnchor', true]); 
 _gaq.push(['_trackPageview', '/?scid=a2412a40-1b66-4e0a-a1d5-f5b260de6ee8']);
 _gaq.push(['b._setAccount', 'UA-xxxxxxx-56']);
 _gaq.push(['b._setDomainName', 'domain.org']);
 _gaq.push(['b._trackPageview']);
 } catch (err) {}
 (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>