google-analytics speed problem?

Locked
User avatar
tyromaniac
Joined: Mon Jul 18, 2005 8:17 pm
Location: Manasquan, New Jersey
Org Profile

google-analytics speed problem?

Post by tyromaniac » Sat Jul 18, 2009 10:43 pm

Is it just me, or does google-analytics slow down the homepage for anyone else?
(waiting for google-analtics....)

All the how to fix sites say that its due to the host server not putting the google analytics script at the bottom of the page so it can load after the actual important stuff for users is loaded.

I have had this problem on other sites too, can someone point me to a quick fix? It's hard to keep this as my homepage :)

User avatar
godix
a disturbed member
Joined: Sat Aug 03, 2002 12:13 am
Org Profile

Re: google-analytics speed problem?

Post by godix » Sun Jul 19, 2009 3:42 am

Block google-analytics. I've done it, for basically the same issue you're having, and I can confirm that everything (including google search, gmail, and other google services) still works. There are several ways to do it and the exact steps generally depend on what browser you're using. The way that works regardless of browser is to edit your hosts file. If you do it this way google-analytics will not load no matter what program you're using. Probably not a problem, but something you should be aware of.

1) Find your hosts file. If you're using Windows 2000, XP, Vista, or 7 then it's at c:\windows\system32\drivers\etc\hosts and if your run some other OS check this to find it's location.

2) Open it in a text editor like wordpad. You might have to be logged in as an administrator to edit it depending on what version of windows you're using.

3) Add the following line at the end of the file & save:

127.0.0.1 www.google-analytics.com



While you're there you may also consider adding the following line as well, it'll help prevent seeing anything on the org in the future that might annoy you:

127.0.0.1 www.animemusicvideos.org
Image

User avatar
tyromaniac
Joined: Mon Jul 18, 2005 8:17 pm
Location: Manasquan, New Jersey
Org Profile

Re: google-analytics speed problem?

Post by tyromaniac » Sun Jul 19, 2009 9:58 am

although that did not work, for whatever the reason, i found another way around it using a very similar method within the browser itself.

I installed adblock plus (firefox), and went into options, then I added a new filter and I added the following:

www.google-analytics.com
www.google-analytics.com
google-analytics.com
ssl.google-analytics.com
*.google-analytics.com

and now whenever it requests data, adblock plus kills it and the rest of the page loads instantly.
Thanks Godix, I'm surprised that you even tried to help me seeing as you're perhaps the biggest critic here (meaning you'd probably say do it yourself)

I hope that other people who have this problem read this so they can fix it with one of these two methods.

User avatar
Nya-chan Production
The :< point of view
Joined: Wed Nov 15, 2006 11:21 am
Status: White bracelet
Location: Ward 7F
Contact:
Org Profile

Re: google-analytics speed problem?

Post by Nya-chan Production » Sun Jul 19, 2009 10:10 am

The reason why it didn't work, maybe, is that that file, iirc, is read only. You have toallow writing first, rewrite it, save it, make it read only again (important) and it should work...

Though your option is fine too ^^
Image

User avatar
tyromaniac
Joined: Mon Jul 18, 2005 8:17 pm
Location: Manasquan, New Jersey
Org Profile

Re: google-analytics speed problem?

Post by tyromaniac » Sun Jul 19, 2009 10:34 am

Nya-chan Production wrote:The reason why it didn't work, maybe, is that that file, iirc, is read only. You have toallow writing first, rewrite it, save it, make it read only again (important) and it should work...

Though your option is fine too ^^
I do remember deselecting read-only when I first went to edit it too. I guess that was what I did wrong. :O

But I'm surprised that I'm the only one who had a problem with this on the forums. I did a quick search of google-analytics and about four irrelevant topics came up.

User avatar
godix
a disturbed member
Joined: Sat Aug 03, 2002 12:13 am
Org Profile

Re: google-analytics speed problem?

Post by godix » Sun Jul 19, 2009 10:57 am

tyromaniac wrote:Thanks Godix, I'm surprised that you even tried to help me seeing as you're perhaps the biggest critic here (meaning you'd probably say do it yourself)
You missed the point of adding 127.0.0.1 www.animemusicvideos.org didn't you?


As for why it didn't work, it could be file permissions. It could be you weren't running as admin. It all depends on which windows version, unfortunately MS likes tossing in fairly trivial changes that make it hard to write a universal instruction set. But adblock works. It and noscript is what I use personally, I like having IE unrestricted just in case.
Image

User avatar
tyromaniac
Joined: Mon Jul 18, 2005 8:17 pm
Location: Manasquan, New Jersey
Org Profile

Re: google-analytics speed problem?

Post by tyromaniac » Sun Jul 19, 2009 11:08 am

godix wrote: You missed the point of adding 127.0.0.1 http://www.animemusicvideos.org didn't you?
Nope, I just skipped over it. I understood that you wanted me to leave :O

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Re: google-analytics speed problem?

Post by Corran » Sun Jul 19, 2009 11:12 am

If you are running Vista, the easiest way to change the hosts file without messing with file permissions or changing UAC is to go to:
  1. Start -> All Programs -> Accessories
  2. Right click Notepad and select "Run as administrator"
  3. From Notepad go to File -> Open
  4. Above the open button change "Text Documents (*.txt)" to "All files (*.*)"
  5. Navigate to the hosts file and open it.
  6. Edit it as normal
  7. Save

User avatar
tyromaniac
Joined: Mon Jul 18, 2005 8:17 pm
Location: Manasquan, New Jersey
Org Profile

Re: google-analytics speed problem?

Post by tyromaniac » Sun Jul 19, 2009 12:35 pm

I'm confused why everyone knows this yet I was stuck with this problem for about six months, only deciding recently to deal with it.

And on a side note, why must the google-analytics load before everything else on the homepage loads? I hear that putting it at the bottom of the script will allow it to load after the homepage loads. The only downside I see to that is perhaps never having google-analytics load because people click from page to page so fast.

User avatar
godix
a disturbed member
Joined: Sat Aug 03, 2002 12:13 am
Org Profile

Re: google-analytics speed problem?

Post by godix » Sun Jul 19, 2009 6:05 pm

I think a better question is why does the org use google-analytics at all? It's mostly used to measure how effective marketing is. It can be used to measure how effective a site layout is. Considering the org doesn't seem that focused on the few ads it has and hasn't really changed it's layout for years I wonder what's the point. Then again, at worst it causes a minor annoyance and even that is kinda rare so it's probably something no one pays attention to but never bothered removing.

Corran knows hosts because he's good with computers. I know hosts because it can be used for sadistic fun. I used to occasionally amuse myself by routing disney.com to goats for people who were parents. I figure it's healthy for children to learn early how fucked up the world can be.
Image

Locked

Return to “Site Help & Feedback”