JavaScript Code Recognisition

emailtoarpit

New Member
Messages
20
Reaction score
0
Points
0
What is the code found in many web pages and apparently it is almost the same across such pages.(I believe so)

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3173067-5");
pageTracker._trackPageview();
</script>

Is it the code for Google Analytics, If yes then can u briefly explain the code.
Morever is the code all by itself or other Javascript code is dependent or associated. Simply put, if I remove the code then does it affect other scripts (Javascript) functionality in the code.

Thanks,
 

jmcgowan

Member
Messages
134
Reaction score
1
Points
18
As lhyman indirectly pointed out, yes, it is the Google Analytics code. While I agree with lhyman that if you're leeching a page then you're stealing someone else's work, I'll add this... if you're not trying to leech code off of somewhere, then it's perfectly safe to remove just that block of code. It is completely and totally independant of any other scripts that might be on the page.
 
Top