blog home

Google analytics bug (or the way it is)

Posted by Jen in trends on October 12th, 2010

gaBeen using Google Analytics tool for a while, to many of the sites that I’ve developed, I took it for granted that as soon as the tracking code is inserted to the page, the tracking status will change to “wait for data”. Actually this was the way it’s been since day one, when GA was using those old style code. I do know though, it will take a while for the tool to collect data, the tracking code was assumed to be detected immediately. However, it’s not the case any more…

Late last night, with this out-of-date assumption, I installed the code to one of my clients’ site, 30 min later, the code is still not detected. Starting to doubt that I made some mistakes in my code insertion method, I tried multiple accounts, machines (PC and mac), domains and asked my friends to try from their end, another friend who is working at google even suggested me to change the tracking code from “ga.async = true;” to “ga.async = false;”… none worked.  Did some research online, and found this Google help forum is pretty helpful. Turned out that the truth is it does need to take a few hours for the tool to detect the code.

This morning I checked back this GA account, status shows “receiving data”.

Just want to let people know, unlike before, Google Analytics now takes time (can be up to 24 hours) to detect the tracking code.

Another trick of CSS for printing in FF

Posted by Jen in coding front-end on November 12th, 2009

firefoxbugWorking on a printing CSS today, and I found when I tried to print or print preview the page in FF, it only prints/shows the first page, the rest are just blank. This issue only exists in FF browser, all others (IE6-8, Safari) are just fine. So what causes the problem and what’s the solution?

All because of this: overflow: hidden
As soon as I removed it, the print preview is good. However, this overflow:hidden is there for a reason, if you remove it, you have to work on the overflow issues. So printing or overfow? you gotta choose one, or if you are flexibile enough, work around the content to prevent it from being overflown.

Well, Firefox also has bugs… it’s the hard cold fact, so deal with it :)

Many reports about this issue in FF suport:

report 1,  report 2, report 3, look at the comments down there, they are really helpful.

be cautious when using window.opener

Posted by Jen in coding front-end on June 15th, 2009

I am talking about window.opener in JavaScript. By defining the attributes of this window.opener, you basically got to control some behavior of the parent window. That sounds cool but might be uncool in some situations as well. For example, when you do this, in order to show some page in the parent window:

<a href=”javascript:window.opener.location=’somewhere”>going somewhere in parent window</a>

It may not work at all, because from this current page, you have no control of where it came from. The user may get the URL of this current page, past it to the address bar directly and there will be no parent page of it all. In this situation, the link on this current page will go nowhere.

Well, just some a little issue I fixed from some badly coded website.