Google Analytics Event Tracking – Measure Calls to Action

Google Analytics Event Tracking – Measure Calls to Action

Do you have at least two places on your website where people can signup for your newsletter?

Are you wondering which one performs better and gets more subscribers to your list?

If this is your case then you can learn how to use Event Tracking in Google Analytics to monitor your calls to action (a signup form, an affiliate banner or a banner that leads to your product website or page).

I briefly talked about how you can setup this in 14 Awesome Features in the New Google Analytics v5, but now I am going to describe the process using step-by-step instructions and another example.

First, you will need to setup event tracking on your website, then add a goal on your Google Analytics account and finally check the data in your Google Analytics reports.

Setup Event Tracking

To setup event tracking on your website, you need to add the code below next to your URL or on the input button (if you use this for a signup form):

onclick="_gaq.push(['_trackEvent', 'category', 'action', 'opt_label', 'opt_value']);"

Here you can read what each element means:

  • Category – this is a required element and can be used to identify the type of the element that you want to track: eBook, video, signup form.
  • Action – another required element, action can be used to define the interaction of your visitor with a specific element which may be: click, button, play, stop.
  • Label – this element helps you easier identify the type of event that is tracked, so you can specify anything that will help you easier recognize this.
  • Value – also optional, this element can be used to specify a value for you event

You will see one example if you check the HTML code of my Genesis ad from the right sidebar. Instead of having in the HTML code only the URL, it also contains the event tracking code:

<a href=”http://www.eugenoprea.com/genesis/” onclick="_gaq.push(['_trackEvent', 'Ads', 'Sidebar', 'Genesis']);”>

The event tracking code onclick=”_gaq.push(['_trackEvent', 'Ads', 'Sidebar', 'Genesis']);” transmits the information to the Google Analytics web servers and every click will be tracked as an event.

But now, I want to show you how to setup Google Analytics Event Tracking to measure calls to action on your signup forms and I will give as example my own Google Analytics course signup form.

I have this form on 4 places: in my sidebar (which is available on almost all pages), on my about page, on the Google Analytics subscription page and below each article I publish.

To track all of them and see which one performs better, I have added the event tracking code on each signup button.

Before that, the code for the signup button looked like this:

<input id=”mc-embedded-subscribe” class=”btn” name=”subscribe” type=”submit” value=”Sign Up Now!” />

Right now, the HTML code for the signup button from my sidebar looks like this:

<input id=”mc-embedded-subscribe” class=”btn” name=”subscribe” type=”submit” value=”Sign Up Now!” onclick=”_gaq.push(['_trackEvent', 'Signup', 'Button', 'Google Analytics']);”/>

What I did, it was to add [Signup] as a category, [Button] as an action and [Google Analytics], [Sidebar], [About] and [Below Articles] as labels.

Just do the same for your own signup buttons or links and you will complete the event tracking setup.

Add a Google Analytics Goal

Next, you will need to setup a goal for each of your events. However, this step is not mandatory and you can skip it to go directly to the Google Analytics reports.

To setup goals for your events, click the gear icon from top right, select the [Goals] tab and [+ Goal] on the first place you see it available.

Next, add a name for your goal and choose [Event] as a Goal Type. Then, you need to fill in it’s Category, Action, Label, and Value.

In my example the Category is [Signup], Action -> [Button] and Label -> [Google Analytics]. As a value I added 1.

Add Event Tracking Goal

You can setup goals for all your events, your most important events or none of them. It’s your choice if you want to see them only in the [Events] section or get more insights about how different traffic sources are sending you visitors that complete actions differently.

Check your Google Analytics Reports

Once the event tracking is properly setup on your website and you have added the goals, you should allow a couple of days to get data into your Google Analytics account.

Then you can see data under the [Content] section > [Events] > [Overview]. Here you can see different metrics for your top events.

You can display the total number of events by [Event Category], [Event Action] or [Event Label].

At the same time, you can also drill down into a specific event category, check multiple actions and see the total number of events for each label.

In my example I have only one category, one action, but multiple labels and I can compare them to see which form performs better.

Additionally, if you have also setup events as goals, you can see how other metrics compare to each other for each goal.

So you can see for example what sources are sending you visitors who subscribe and what forms those visitors use. You will be able to see if your “below the post” signup form or call to action performs better than the one in your sidebar.

Using event tracking goals you are able to analyze different conversion rates for each goal, based on different traffic sources, visitors, demographics, landing pages and much more.

Your thoughts

Now that you know how to use event tracking in Google Analytics to measure calls to action, please use the form below to share with us the process and the outcomes of this action. What was difficult and what additional insights do you get now?

Enjoyed this article? Get Updates! It's free!

Learn more about increasing email subscribers and converting more traffic into loyal customers. Join and you will get:

  • 7 biggest conversion mistakes and how to fix them
  • Google Analytics course
  • Fresh content to help you build a profitable business

Powered by Elevatr

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...
About Eugen Oprea

I am passionate about technology and I love to help people confused by technology build a remarkable presence online. To find out more about me check my profiles on Twitter, Facebook, or LinkedIn.

Comments

  1. Amazing!

    The only tutorial on the web that explains track events in plain english.

    Thank you soooo much Eugen.

    Will be testing on my blog. Hope I don’t mess with the code.

  2. Thanks for this, Eugen! I have actually been looking to do this, and your explanation makes perfect sense to me, a non-coder. I am definitely going to start tracking whether sign-ups are occurring in the sidebar versus below articles versus on the About page – very useful info for me!

    Question: since I have sign-up boxes below every post (I use Thesis, so I embedded the sign-up box as a function to appear below every post), is it possible for the event tracking code to pick up some value identifying the post from which the sign-up occurred (post name or number)? I’d like to know which posts are generating the most sign-ups.

    • Deborah thank you for stopping by!

      Yes, you can actually see this if you go to [Content] > [Events] > [Pages]. Here, all you have to do is just add [Event label] as secondary dimension from below the chart.

      If you have followed my example you should see as labels sidebar, about and below article or the ones that you have setup.

      This way you can see for each page what events occurred and their number.

      Alternatively, add this custom report to your account and click in the event to drill down at a page level.

      Please note that if you have more than one event categories, you should use advanced segments to include data only from one category.

      I hope this helps, but if you have any other questions, please let me know.

  3. Hi Eugen

    thanks for a very clear and helpful article – I’m a little worried about event tracking because I’ve read that it can affect the bounce rate on the page it implemented in – is this true?

    thanks

  4. Hi, thanks for the tutorial!
    I’ll try to follow the instructions.

    Please would you mind adding year information to your posts? It is amazing how many bloggers ignore that VALUABLE piece of info. IT changes by day, information can be obsolete the next day after an API change. Sorry for the small rant :-)

    • Jose, most of the people don’t add dates because the content is evergreen.

      If you will come in 2 years to this post and you will see 2011 on it, you will close the page immediately without knowing that the advice still applies.

      However, I regularly update my articles and I make sure that the information I share is not obsolete.

  5. Susanne says:

    Awesome post!
    Thank you for taking so much time out of your day to teach us the ins-and-outs about GA. I can’t tell you how many “ahhh” moments I have whilst going through your lessons.

    Thanks again,
    Susanne

  6. Hi – I am wondering if the data I see in my Analytics reports is the total number of visitors that completed each event I’m tracking, or the total number of instances? For example, would 3 clicks on a tracked button from the same visitor show up as ’1′ or ’3′ in the reports?

  7. I really appreciate your article its awsome
    i have an youtube video in my website how do i track with event tracking code kindly explain and if i replace youtube video to another embedded SWF video so how can they work ?

    Thanks Alot

  8. Super helpful. Thank you.

    joy

  9. Very interesting. I was underestimating GA Events Push ability. It can be used for any kind of events like tracking who clicks on “play” for a Video or anything.
    Thanks for the explanation.

  10. We have been trying to do EXACTLY the same thing, but we have been having a problem with the events being tracked properly. We have three locations where people can sign up, but everything is getting logged under one location label (“header”), and we can’t figure out why. Here are the tracking codes we are using:

    onClick=”_gaq.push(['_trackEvent', 'subscribe', 'email', 'details-page', 1, false]);”

    onClick=”_gaq.push(['_trackEvent', 'subscribe', 'email', 'header', 1, false]);”

    onClick=”_gaq.push(['_trackEvent', 'subscribe', 'email', 'promocode', 1, false]);”

    All three use the same basic code for the button, so I will only include one:

    <button type="submit" class="button" title="__(‘Subscribe’) ?>” onClick=”_gaq.push(['_trackEvent', 'subscribe', 'email', 'details-page', 1, false]);” >__(‘Subscribe’) ?>

    So why is Google showing all events under “header” – any ideas?

    • [follow-up]
      It’s working now!
      We originally tried to put this code in the form tag using onSubmit instead of onClick, but everything was being tallied under the “header” label. We thought it might be because onSubmit tracked all forms on the page as one event, so we tried using onSubmit for one and onClick for the other. Waited several days for the tracking to update, but still had only “header” events registering. Finally, we tried using all onClicks and waited more than 48 hours, but same results. That’s when I posted the first time. Over the weekend, it started registering separate events under separate headers – finally.

      Bottom line: I would stick to onClick only, and expect to wait MORE than 72 hours to see results.

  11. Thanks for sharing the information ! Cheers !

  12. Hi,
    I’m trying to set up even tracking on a signup button on our website. The button is part of a form located on our secure site being pulled onto a page on our public site.
    I’ve included the tracking code in the input on the form and tried including the script on the form and on the page but I am not able to track anything from it.
    Do you have any suggestion?

  13. Eugen, merci mult ptr post-ul asta. I haven’t seen anyone explain event tracking quite as well as you have here. I’ve spent a handful of time during the last 24 hours trying to get this to work but I still don’t have a single event showing up in GA. I guess I have two questions. First, is creating a goal necessary? The events should be registered even if a goal isn’t setup to treat them as a conversion, right? Second, how long does it take for an event to show up in GA? I saw someone say it took 72 before some of the trackEvent changes made it to GA. Would there be a similar delay for registering the first events? Thanks again, Eugen. Keep up the awesome work.

  14. hello Eugen Oprea.. I’am Syaiful, but my blog in Indonesian..
    I just implement your advise in my sidebar opt-in 3 days ago..but in my google analytics acount, I don’t have a data about that event… Please help me…And check my code..I can’t correct my fault..

    If you have found that, please email me at syaiful@pengunjungblog.com

  15. Does anyone know how can I test if google analytics is getting the push events from my site ?

  16. I have some events set up, but I am still confused how to use the reports to learn which events are helping my visitors reach my Goals. My Goals are thank you pages after completing a number of forms. How do I see which events are helping my visitors reach the thank you page?

  17. Maybe I should be a little clearer – I actually have set up a custom report where I thought I would see the conversions. I see the Event Category etc, but the Goals are all zero.

    • Hey Debbie,

      You can use Event Tracking to measure the effectiveness of calls to action within a page or on your site.

      However, if you are looking to see what pages your visitors have used before reaching your goals, you might want to check Goal Visualization and apply an Event Label segment.

  18. Igor Kovacic says:

    Hello Eugene,
    I am using event tracking on my website (www.trip.hr) in the same way as described in your example.

    I am confused by the following – http://support.google.com/analytics/bin/answer.py?hl=en&answer=1136920. Google says that it is necessary to delay opening of the link to record event. There is story about the outbound links, but logic is the same like we are going to another page on the same domain.

    What is your opinion?

    Thank You!

  19. Thanks for this writeup, Eugen. You explained it very clearly!

  20. Hi,

    I like this method. Can I also use it to track how many people complete the subscription form from each button? How would I do that?

Trackbacks

  1. [...] Google Analytics Event Tracking – Measure Calls to Action – Eugen Oprea [...]

  2. 5 Goals Every Blogger Should Set Up in Google Analytics says:

    [...] first learn about how you can use event tracking and what it means for measuring your ads’ [...]

  3. [...] first learn about how you can use event tracking and what it means for measuring your ads’ [...]

  4. The Best Use for Goals in Google Analytics | Custom Webdesign Articles, Templates & Elements says:

    [...] about what event tracking means and how you can implement it.So, first learn about how you can use event tracking and what it means for measuring your ads’ effectiveness.Now, once you setup event tracking on [...]

  5. [...] < paulwylie Get flash to fully experience Pearltrees Google Analytics Event Tracking – Measure Calls to Action – Eugen Oprea If this is your case then you can learn how to use Event Tracking in Google Analytics to monitor [...]

  6. What Is A CTA & How Should I Use It? - Green Rock Connect says:

    [...] of clicks over the times the CTA was seen, you can do this using Goggle Analytics and over at http://www.eugenoprea.com they have published at step-by-step guide to doing just that. Alternatively you could employ the [...]

Are You Making These 7 Conversion Mistakes?

Conversion Mistakes

Discover the 7 biggest conversion mistakes that people make (and how to avoid them, so you can get more subscribers and sales).

Join my private newsletter and get the course that will show you:

  • A sneaky way to figure out exactly what your audience wants
  • The easiest way to see where your visitors lose interest and click away
  • How to convert more visitors to email subscribers, and build a list that converts

Powered by Elevatr