Tracking Clicks on Your Squarespace Website with Google Analytics Events

Tracking Clicks in Squarespace with Google Analytics Custom EventsSquarespace's anayltics reporting are nice for high-level stats, but often you'll need Google Analytics to answer deeper questions about what people do on your website. For example, have you ever wondered how many people have clicked on a link on your web page or within your blog posts? Using Google Analytics event tracking, you can track clicks on your Squarespace website.

Using Google Analytics Event Tracking to Track Squarespace Clicks

Google Analytics event tracking is a way to record when things happen on a web page that GA wouldn't otherwise capture. These custom events can be set up to track all sorts of interactions, such as when people click on a link, operate the controls of a Flash video player, or hover over an image.

For example, I use GA's events to track when people click on the links featured in the Squarespace Designer Directory. Here's the listing for my pal, Alan Houser of Creative Component, LLC.

Tracking clicks on a website

With event tracking, I can track the traffic (and potential new business) I'm sending to Alan through the links to his website and sample websites featured in his listing.

Setting Up Google Analytics Events in Squarespace

Configuring Google Analytics events requires dabbling with a little code. To start, edit an page on your Squarespace website that contains a link you want to track, and switch over to Raw HTML mode. 

Squarespace Raw HTML mode

Find the link you want to track within the HTML of the page. It should look something like this:

An untracked HTML link in Squarespace

To add Google Analyltics event tracking, I integrate the following line of code with my existing link:

JavaScript/HTML for Google Anaytics Custom Event

After integrating the GA code with the link, it looks like this:

A Google Analytics tracked HTML link in SquarespaceIt may not look like much, but this little snippet of code can be modified to track just about anything on your site that Google doesn't track out-of-the-box. The parts of the graphic below in gray never change, but you can modify the Category, Action, and Label each time you track a new link.

Anatomy of a Google Analytics Event

In the case of the Squarespace Designer Directory, my Category is "Outgoing Links," my Action is a "Click," and my Label is the URL of each link I track. See Google's official Event Tracking Guide for complete details. 

Accessing Event Reporting in Google Analytics

Once you've set up your events, you can access them in Google Analytics through several standard reports. The Events Overview report is available through the navigation by selecting Content -> Events -> Overview

Google Analytics Events Overview Report

Drilling down into the Top Events reports to individual Event Labels allows you to see the most popular events. In my case, it's the most popular links within the Squarespace Designer Directory. Turns out, Alan was the most popular designer in the last month, receiving 43 clicks to his site from the directory.

Google Analytics Events Reports with Labels

If there's a reason to track clicks on your Squarespace website, chances are Google Analytics events tracking can help you do it.

What types of things are you looking to track on your website? Try setting up custom events on your site using the tips above. Leave your questions and/or success stories in the comments. I'd love to hear them!