Integrate Google Event Tracking with JavaScript

This post discusses easy ways to integrate Google Analytics Event Tracking in your website. Event Tracking is a tool that broadens your ability to track user interaction with your website. Prior to event tracking, using Google Analytics gave you rich information about your page views. With Event Tracking you now have a wealth of information about usage on your non-page reloading events such as AJAX calls, hover events, mouseovers -- anything you would like to define and track. (Just make sure you have an account first).

It's dead simple and, after setup, takes a one-line call to a JavaScript method supplied by Google:

pageTracker._trackEvent(category, action, opt_label, opt_value);

You just have to get the right arguments to that method, so you know what you're tracking. In the Google tutorial the example is predicated around sending the arguments to the _trackEvent method inline on an onclick event. Instead of doing that, which will create redundant script tags in our views, let's label our markup in such a way that we can grab a collection of trackable elements via JavaScript and submit them automatically, on a click (or other) event.

Read the rest of this post »

Chasing People through The Google

I love my dad. He's an original. And sometimes stubbornly so. For instance, when his originality is dried up and he's in a creative slump, he starts slinging language around like confetti, minting word-concoctions like wildwildwild, spoink, and metaNow.

What do they mean? Despite the fact that more often than not the new words are presented in some awesomely frightening font, such as showcard gothic, and are at least 70px high, no one actually knows. And more than one person has been burned by a quick defensive reaction when inquiring whether wildwildwild is actually a viable business plan. (Answer: of course!).

He loves PowerPoints and Word Documents, often writes without capital letters, and has a sixth sense for pronouncing words and names exactly... wrong. Syllables go where no syllables have gone before.

Read the rest of this post »

Love, Software, and Squeals of Delight

[cross-posted on devchix]

Media_httpimgskitchco_xyczr
Software does more than crunch your numbers or take your picture: it can make you angry or bring you joy. And those are the things that we, as developers, have to tune in to if we want to make our products stand out.

Skitch is one of a handful of products I’ve used recently that remind me what makes a product successful. Utility is important, of course, but the love and emotional connection it engenders in its users is where it's going to live or die.

Let's start backwards, with the logo, since it's the first thing you see. Their logo says nothing about their product's functionality. There's no initial, no recognizable signifier (thanks for sparing us the paintbrush), or even an abstract swoop. It's, um, a heart.

Read the rest of this post »

Fixture Replacement with Factory Girl (Sorry :quentin)

I've been working with fixture replacement objects for quite some time in my Rails testing, so the concept and the ease-of-use isn't new. The solution I've been using is a home-grown one implemented by a former colleague in response to discussions at work about how best to replace our store of seed data and fixtures but still get objects that are initialized to a set of reasonable (i.e., valid) defaults with the option to override. It was a good solution for us at the time. That said, I've heard a lot of buzz about Factory Girl. Given that I was setting up testing in a new project last night, I took the opportunity to explore it.

Read the rest of this post »