• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

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 :D
 
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