Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

When tracking clicks on links, there are 3 items I'm interested in:

  • link location in the page by grabbing the id of the closest parent: to see influence of location on click-through
  • link text: to see influence of text on click-through
  • link href attribute value: to see where people go when leaving my website

The problem when using Google Analytics to track those clicks is that events only have 3 available text fields, one of which being the category, which if you use to store one of the above items will create a mess in your Event reporting because you will have as many categories as item values.

Therefore if you assign a predefined value to the category (e.g. clicks), then you're left with only 2 event fields (action, label) to store 3 items (location, text, href).

That in itself isn't the end of the world because you can concatenate 2 items into 1 event field, then use the reporting or the API to filter things out.

Accordingly what I plan on doing is this:

category: clicks
action: {location_on_page} ¦ {text}
label: {href}

where {__} are variable values related to the clicked links

With this I can easily create some reports directly via the GUI:

  • downloads: include only events where label ends with .pdf
  • click outs to particular domains: include only events where label contains domain

And for more complex tasks I need to export the data (or use the API):

  • influence of location on clicks: for each location in the design, count number of events that have that location in the action, then corroborate with pageviews of the corresponding pages.

Whilst this looks good I'm wondering if there is a better approach, hence the following questions:

Q1: Can you foresee any particular issues with this particular setup (e.g. things I won't be able to report on)?

Q2: Can you think of other data that would be interesting to include in the event?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.