Skip to main content
CSS is fun and cool and I like it.
Link

Comparing Data in Google and Netlify Analytics

Article

The Analytics That Matter

I’ve long been skeptical of quoting global browser usage percentages to justify their usage of browser features. It doesn’t matter what global usage of a browser is, other than nerdy cocktail party fodder. The usage that matters is what users on your site are using, and that can be wildly different from site to site.

That idea of tracking real usage of your actual site concept has bounced around my head the last few days. And it’s not just “I Read article “The Analytics That Matter”

Article

Extending Google Analytics on CSS-Tricks with Custom Dimensions

The idea for this article sparked when Chris wrote this in Thank You (2018 Edition):

I almost wish our URLs had years in them because I still don’t have a way to scope analytic data to only show me data from content published this year. I can see the most popular stuff from the year, but that’s regardless of when it was published, and that’s dominated by the big guides we’ve had for years and keep updated.

I have … Read article “Extending Google Analytics on CSS-Tricks with Custom Dimensions”

Article

Google Analytics Data Studio

I’ve said a number of times in the past:

I wish I could just check a checkbox and make certain Google Analytics data public.

I get that analytics can be a very private thing for some sites. I think there are just as many sites where that data just doesn’t need to be private. Not only would it be interesting, but insight might be gleaned from having more eyeballs on the data, and it could contribute to a wider data … Read article “Google Analytics Data Studio”

Article

Google Analytics Can Show You Screen Resolution ≠ Browser Window

It was five years ago when I wrote Screen Resolution ≠ Browser Window. The idea was that, at the time, there was a lot of talk about monitor size in relation to how we design websites. JavaScript is happy to tell the dimensions of a monitor: screen.width. But how useful is that? Isn’t it more useful to know how big the actual browser window is? Of course, it is. We don’t write media queries based on screen.width, … Read article “Google Analytics Can Show You Screen Resolution ≠ Browser Window”

Video

#146: Getting More from Google Analytics with Philip Walton

I pair with Philip Walton (who works for Google on Google Analytics) in this screencast. It complements the case-study we put together: Learning to Use Google Analytics More Effectively at CodePen.

I learned a ton about how Google Analytics works during all this. In a sense, it’s dumber than you think. You can track whatever you want, you just need to send the right data. In another sense, it’s super smart. By giving it just a smidge more information, … Read article “#146: Getting More from Google Analytics with Philip Walton”

Sponsored Article

Learning to Use Google Analytics More Effectively at CodePen

Here’s how most people use Google Analytics: you copy and paste the default tracking snippet into your templates. Look at the pageview data that comes in. That’s all good, but that isn’t the most useful analytics for many sites. Google Analytics can track just about anything. It’s very flexible and very powerful. Philip Walton and I co-wrote this article to show you how to do some custom GA stuff to help you collect data you maybe didn’t know you could Read article “Learning to Use Google Analytics More Effectively at CodePen”

Snippet

Track Window Resizes through Google Analytics

Sparkbox has this snippet to help figure out how often browser windows really are resized.

(function() {
  var resizeTimer;
  
  // Assuming we have jQuery present
  $( window ).on( "resize", function() {
    
    // Use resizeTimer to throttle the resize handler
    clearTimeout( resizeTimer );
    resizeTimer = setTimeout(function() {

     /* Send the event to Google Analytics
      *
      * https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEventTracking
      * _trackEvent(category, action, opt_label, opt_value, opt_noninteraction)   
      */
      var $window = $( window );
      _gaq.push( [ "_trackEvent", "User Actions", "Browser Resize", $window.width() + " x 
Read article “Track Window Resizes through Google Analytics”
Video

#31: Introduction to Google Analytics

Google Analytics is a free service to track all sorts of information about the visitors to your website. I recently had a weird experience with the Analytics on CSS-Tricks, so I thought it would be a good time to introduce it to folks who might not already know much about it and also share that experience. As with most things, it has its ups and downs, so I introduce an alternative product at the end as well.

Links from video:Read article “#31: Introduction to Google Analytics”

Article

Track Outgoing Clicks in Google Analytics with jQuery

Ian Pitts sent me this trick a while back and I’m just getting around to publishing it. Thank Ian!

Google Analytics (intro video here) is powerful stuff, but one notable lacking feature is data on outgoing clicks. If you are using jQuery, plop this code on your page and you’ll be tracking outgoing clicks in no time.… Read article “Track Outgoing Clicks in Google Analytics with jQuery”