I saw this code in the header.html of a theme. What does it do?
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-563843-7";
urchinTracker();
</script>
Thanks,
Rob
Hello Robert,
It looks like some kind of tracking device for site visitors. Here is a link about Google Analytics http://www.google.com/analytics/
Best wishes...
As in spyware? I downloaded this theme from moodle.org.
I should probably remove the code then.
The theme is experience 247 v4
Thanks
Rob
I should probably remove the code then.
The theme is experience 247 v4
Thanks
Rob
Go ahead and delete it as it does nothing for your theme. The theme developer must want to keep track of your site visitors for some reason.
I deleted it. I am not fond of spyware. Surprised to find it in something related to Moodle.
Rob
Rob
Which theme is it?
This is the code for Google Analytics, as other people have already mentioned. As a big advocate of GA, I'd like to add a few points...
- If you got the Theme for free and the designer just wants to get an idea of how many people are using it, then fair is fair, right?
- However, this could should be in the footer, not the header. Specifically, right before the terminating </body> tag, as per Google's instructions. Putting it in the headier can make the entire site slow to load.
- Also, if you want to track statistics for your site, signing up for GA is free, and I'd highly recommend checking it out and then putting your account information in the code.
- If you're really going to use GA regularly, then one setup I've seen that is a good compromise is to cache the external urchin.js file and only update it from Google's site every 24 hours (the Google Analytics module for another CMS, Drupal, has the option of doing this built-in).
Hi,
I had already explained this code in this topic: http://moodle.org/mod/forum/discuss.php?d=88645
But I will follow Klause his advise and place the tracker in the footer, thx Klause.
Dimitri
I had already explained this code in this topic: http://moodle.org/mod/forum/discuss.php?d=88645
But I will follow Klause his advise and place the tracker in the footer, thx Klause.
Dimitri