Google Analytics setVar() deprecated and replaced by setCustomVar()

Other December 7th, 2009 @ 15:12

For a while, there’s been a possibility to separate your users in various segments in Google Analytics, by setting a (single) variable in the Analytics cookie, for example:

pageTracker._setVar("member-premium-true");

Earlier this year, Google introduced the neat possibility to use multiple custom variables, allowing more customization and flexibility. You are allowed to use five slots (1-5) and set a name, value and scope to your variable.
The old setVar method has been deprecated and replaced by the new setCustomVar:

pageTracker._setCustomVar(
      1,                // This custom var is set to slot #1
      "Member Type",    // The name of the custom variable
      "Premium",        // The value of the custom variable
      1                 // Sets the scope to visitor-level
 );
pageTracker._trackPageview();

This isn’t really news, but it wasn’t obvious what had happened by just looking at the Google Analytics API docs, so I thought I’d mention it here just to “spread the word”.

<script type="text/javascript">
				pageTracker._setVar('member-premium-true');
			</script>

CSS compatibility in Internet Explorer 6, 7 and 8

Browser Compatibility October 14th, 2009 @ 13:10

I just came across this article in Smashing Magazine about the CSS differences in Internet Explorer 6, 7 & 8.

Nothing new really, but a good summary of what works and what doesn’t. The consensus is of course that you have to be aware of that IE6 pretty much can’t handle anything, so we’re still bound to write old code to be compatible with it. Sad but true!

10 useful usability findings and guidelines

Other September 24th, 2009 @ 11:09

Smashing Magazine posted another great article today about usability.

Summarized, their findings were:

  • Form Labels Work Best Above The Field
  • Quality Of Design Is An Indicator Of Credibility
  • Most Users Do Not Scroll
  • Blue Is The Best Color For Links
  • The Ideal Search Box Is 27-Characters Wide
  • White Space Improves Comprehension
  • Effective User Testing Doesn’t Have To Be Extensive
  • Informative Product Pages Help You Stand Out
  • Most Users Are Blind To Advertising
  • Bonus: Findings From Our Case-Studies

Not necessarily new findings, but as usual, very interesting reading!

Calculating CSS selectors’ specificity

CSS March 23rd, 2009 @ 11:03

(This is actually old news, but maybe some people out there has missed it.)

Sometimes, developers get confused when it comes to understanding why a certain selector overrides another. I guess the standard ways of solving it is reordering the selectors in the CSS or using ID selectors instead (as they’re well known to override most other selectors). But there’s of course plenty of logic to why certain selectors override others, and the reasons can be found in the official W3C documentation.

It’ll help you a lot in creating a sold and good structure in you CSS documents. Probably a good idea to keep the list bookmarked until you remember the rules, though… :-)