Matt’s guides to Google Analytics and the value of informative file names

Matt Lane has done a nice job explaining how Google analytics works in two nicely illustrated posts over on Medium. I particularly like the way he explains (and shows) what the snippets of code look like and how and where to add functionality.

The first piece, An Idiot’s Guide to Google Analytics, looks at the basics, starting with helpful images of the source code for a webpage without tracking code and with tracking code.

The second, Supercharge your Google Analytics, walks you through how to get more information out of analytics, including demographics, filtered views, time-spent-on-site calculations, and tracking search, downloads and external links.

I want to endorse Matt’s advice on giving the views you create in Google Analytics informative names – so that anyone in your organisation can see the name and understand what the view is going to show them.

Giving files, images, folders, views – anything you create – useful names is the best of habits to get into. The small amount of extra time you take to give your file a useful name (that you or anyone else will understand today, next month or a year from now) will spare you hours and hours of time and frustration later.

Matt gives a couple of examples of well-named views:

www.domain.com (UNFILTERED)

www.domain.com (EXCL. <orgX> and <orgY>)

I like the tips offered by the people over at ustwo on naming systems for web design/development workflows. In their fantastic Pixel Perfect Precision design guide they suggest the following system for naming design components:

A good approach is to base your naming on a hierarchical system, which starts off with a broad identification of the component and then progressively adds more information. So you might end up with a structure like this:

type_location_identifier_state

The type refers to the category the component belongs to, such as:

bg (background)

btn (button)

 icn (icon)

img (image)

The next step is to add the screen or location where this component appears:

bg_help

btn_home

Then add the unique identifier, as an example, buttons on the home screen which create and delete documents would be called:

btn_home_new

btn_home_delete

Finally, if the component has multiple states then add them to the end:

btn_home_new_default

btn_home_new_highlighted

Designer Kerem Suer has shared a naming convention for Photoshop files (and their various iterations) on Dribbble:

filename platform direction iteration

For example:

ContactMob1a.psd

You’ll see other people’s suggestions in the comments on Suer’s piece, and some more here.

Jill Duffy makes some good points about file names on PCMag. She says file names need to be:

  • unique
  • indicative of what the file contains
  • in line with how your business thinks about information
  • scannable (with the human eye) according to how you and your employees find information
  • naturally ordered alphabetically
  • consistent!

Just think of how much more productive you and your colleagues could be if you knew with high certainty what each file contained before you opened it.

She gives the following examples:

date code context description

For example, for a photo of a market in Montreal taken in September 2010:

1009bg_montreal_market.jpg

If there are lots of market images she’ll add more detail to the name:

1009bg_mnrl_mrkt_peppers01.jpg (image of peppers taken in market in Montreal in September 2010)

Righto. That’ll do for now.