← All Blog Posts

Tracking link clicks with Google Analytics

When I released Skylights a few months ago, I wanted to track how many people actually clicked the download link to give me a rough idea of how many people were trying them out.

Luckily, Google Analytics lets you track particular interactions on your site using ‘Events’. Setting up an event to be logged is pretty straightforward, all you need to do is add a tiny bit of code to the onClick attribute of a link like so:

<a href=’download’ onClick=’_gaq.push([‘_trackEvent’, ‘Download Button’, ‘Click’, ‘Product page’]);’>Download Button</a>

</code>

The example above uses three parameters:

  1. Category: (Download Button)
  2. Action: (Click)
  3. Label: (Product Page)

These values are logged & visible via the Content > Events tab within the analytics dashboard:

Events in Google Analytics

Using different values for these parameters allows you to track different interactions across your site & see which areas perform better.

If I decided to add a new download link to the sidebar of my site for example I could use the following parameters:

  1. Category: (Download Button)
  2. Action: (Click)
  3. Label: (Sidebar)

The first two parameters stay the same as it’s still a download button, but now I can track the one in the sidebar separately as it has a different label.

And that’s pretty much it! It’s only a basic example of using events but it’s one I’ve found quite useful for giving me a rough idea of where people click & which areas are performing well.

If you’d like to know more, Google have setup quite a handy guide.

Filed under:

Rewilding the planet with freelance animation and motion design

We've only got one planet, and right now it needs all the help it can get. Climate change and biodiversity loss are massive challenges that we need to tackle head on.

That's why, for every freelance animation project over £1000 a donation of 1% of the total budget will be made to the World Land Trust, on your behalf.

The money will go towards WLT's "buy an acre" programme; buying up and protecting vital habitats around the world, and helping fight against climate change.

Any motion design projects under £1000 will have a tree planted on your behalf.

Acres saved so far:

Thanks to my wonderful clients and the animations we've produced, enough money has been donated to save around:

17.5 Acres of vital habitats around the world.

Just think, your animated explainer video or logo animation could also be helping fight the climate crisis!

If you're interested in some freelance animation work and saving the planet, get in touch and let's chat!