This was inside the script tag of a website.
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-18914337-1']);
_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);
})();
I’m not very conversant with Javascript or jQuery. I saw this on a website and I’m wondering what it does…
The code in your post is Google’s analytic tracking code. It’s not jQuery, it’s pure JavaScript. Google does a good job explaining what their tracking code does.
Google Docs Resources
Quote from Google’s docs: