Newbie Google Analytics question

Hello, I am setting up the Event Tracking for a basic website that uses Universal Analytics (analytics.js).

Most of the events I want to track will take place on the homepage and on a page where visitors can download documents.

What are the most commonly used Categories and Actions that web developers use for event tracking?

Where should I put the event tracking code on my website?

There really aren’t any rules that say what your Categories and Actions should be named, just name them something that sounds logical to you. For example, for a document download you could go for Category document and Action download, for a video you could go for Category video and action video. Basically the Category is the subject something is done with, and the Action is what is done with it.

Usually you would put the code for this in a javascript block just above </body> in your HTML.

If the user does-and-that, then send the following to google analytics.


Hey @SwiftorNY, if you are not a developer, I strongly suggest that you replace the Google Analytics code on your site with Google Tag Manager.

It is basically a container that allows you to set up Google Analytics together with intermediate and advanced implementations such as event tracking or scroll reach tracking without having to touch code.

Google Tag Manager:
Event Tracking for Google Tag Manager:

Traditionally, other than the Google Analytics code, you’ll need to wrap the link or button that you want to track for events with a snippet of custom code. You can visit this guide to learn more about how to implement it. Look for the “Using Universal Analytics Event Tracking (analytics.js)” heading.

If your final goal is to monitor Download. Then you can use Event Tracking on click button code. The Sample of the code is given below

<a class="bttn_flat" href="/downloadpdflink.pdf" onclick="_gaq.push(['_trackPageview', '/homepagelink']);">Download</a>

HI SwiftorNY,
If you are not working with codes use Google tag manager.To set up event tracking for download document on your site you need to place a code snippet on the button where visitors click to download the document. Below is the Basic code for event tracking.
onclick=“ga(‘send’, ‘event’, ‘category’, ‘action’, ‘label’);”
onclick=“ga(‘send’, ‘event’, ‘category’, ‘action’, ‘label’, value);”
You can visit this link also
Hope this will help.

The question was asked in October, answers have been provided and the OP has never returned. There seems little point in reviving it now.

Thanks to all who contributed.

This topic is now closed. New replies are no longer allowed.