kalovast — 2012-05-24T11:23:06-04:00 — #1
I need to be able to separate the Google Analytics reporting on my site in the following ways:
- Full tracking for www.example.com
- Track support.example.com subdomain in a profile under the main site
Yesterday, I replaced the traditional tracking code with the following modified code:
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
var pageTracker = gat.getTracker("US-XXXXXXX-X");
Since I added this code, ONLY the organic search traffic from Google has decreased, and by 83%. I have never tracked a subdomain before and there was a lot of older material online about how to do it, because apparently Google's own code is messed up. Can anyone provide any insight as to why this drop in organic traffic may have occured? Any ideas for a fix? I'd really appreciate any and all advice.
kalovast — 2012-05-25T11:26:37-04:00 — #2
Nobody has any suggestions, insights, ideas?
topgrade — 2012-05-27T11:58:29-04:00 — #3
Not sure but the drop in traffic should not be due to adding this code. To verify it just remove this code and check if the traffic starts increasing again. If not then there could be some other problem but not the code.
system — 2012-05-29T04:02:14-04:00 — #4
I used this code for tracking.Try this code
var _gaq = _gaq || ;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
Hope this will help
vcarecorporation — 2012-05-31T03:20:58-04:00 — #5
May be your modification and updation is not like Google Analytics Code.Why don't you changed it with original one.
nacworld — 2012-07-11T04:57:08-04:00 — #6
Do you have 2 analytics url account for same domain? Maybe the traffic has splitted to 2 domains...