• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

Google Analytics?

wethead

Chevereto Member
Hi


Where is the best place to place the Google analytics code?

Can you tell me what exact file?


Thanks so much in advance 😀
 
Javascript for better performances should always be loaded and executed in the footer after every html/css components has been initialized. So I suggest you put it iniside footer.php
 
Rodolfo said:
Doesn't matter, is asynchronous.

http://developer.yahoo.com/performance/rules.html#js_bottom
Put Scripts at the Bottom

tag: javascript

The problem caused by scripts is that they block parallel downloads. The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won't start any other downloads, even on different hostnames.

In some situations it's not easy to move scripts to the bottom. If, for example, the script uses document.write to insert part of the page's content, it can't be moved lower in the page. There might also be scoping issues. In many cases, there are ways to workaround these situations.

An alternative suggestion that often comes up is to use deferred scripts. The DEFER attribute indicates that the script does not contain document.write, and is a clue to browsers that they can continue rendering. Unfortunately, Firefox doesn't support the DEFER attribute. In Internet Explorer, the script may be deferred, but not as much as desired. If a script can be deferred, it can also be moved to the bottom of the page. That will make your web pages load faster.
 
Rodolfo said:
Never trust on yahoo

Yeah, right... Yahoo developpers are newbie... of course..
Im not a fan of yahoo either, but I know they are better then me in many points. Many of them have doctorate in programmations.
Also Yahoo is a major player in developpement of add-ons to test your website speed.
Such as YSlow so could you give me arguments why not to trust yahoo?


Also, some browsers... such as IE only allow 2 simultanous connections. So if it is loading google analytics, it cannot be loading jquery and a css file. Which in the end will make your website slower.

You should load static elements, such as css files and then load javascript.
 
Back
Top