events and goals google analytics

Google Analytics: Turning Events into Goals

12 5.00 RATE THIS

events and goals google analytics

  • by Ryan Stewart
  • @HelloWEBRIS
  • @RyanWasHere
  • Ryan Stewart

    I have an unhealthy obsession with being considered the world's BEST internet marketer. This blog is one of the channels I use to demonstrate that. I'm highly active on social media and love a good debate (bring it internet trolls). Click the icons below and fire away.

    There are certain actions on your website that Google Analytics’ Goals cannot tracked.

    Typically, these actions take place independently of a page load. A few examples are:

    Flash
    Document downloads
    AJAX elements
    Web forms (that remain on the same page when submit)

    These actions need to be tracked as Events.

    Events are an important feature of Google Analytics because they let us track key user actions on our site. However, the reporting of Events is limited. When you’re using Events to track form conversions, they don’t get the job done.

    That’s why Google allows you to turn your custom Events into Goals.

    Goals reporting is more robust and useful for tracking conversion actions.

    This post has two parts:

    1. How to define, create and code custom Events in Google Analytics
    2. How to create Goals based on your custom Events

    Part One: Creating Custom Events

    Events aren’t as easy to set up as Goals – it requires customization of your JavaScript file. Implementation details should be covered in your company’s measurement plan. If they aren’t, here’s how to code your Event.

    Defining Requirements

    I have 5 forms on this website, 3 of which use AJAX elements (no redirect to thank you page). Here’s the JavaScript snippet I wrote to track submissions on my Contact page:

    onClick=”ga(‘send’, ‘event’, { eventCategory: ‘Contact ‘, eventAction: ‘Submit’, eventLabel: ‘Contact Page Form’, eventValue: 50});”

    Scared? It’s very simple to write. There are 4 elements you need to account for:

    1. Category

    Category is the name for all events of a certain type. Since I wanted to track contact form submissions, I set the category value to “Contact”.

    JavaScript: eventCategory: ‘Contact’

    2. Actions

    Actions are the specific user events that result in the JavaScript being fired. For my example, I want to JavaScript pixel to fire (track) when a user clicks “Submit”.  Other possible actions:

    PDF or document download
    Starting a video, stopping a video, pausing a video
    Playing a podcast

    JavaScript: eventAction: ‘Submit’

    3. Labels (optional)

    Labels are values that help describe the action. I recommend filling this out if there are similar actions you’ll want to to distinguish. In my example, I have multiple contact forms so I added the value “Contact Page Form”.

    JavaScript: eventLabel: ‘Contact Page Form’

    4. Values (optional)

    This value denotes numeric metrics like file size, video length or download statistics. My leads are each worth $50 to my business so I added the value of “50”.

    JavaScript: eventValue: 50

    That’s it! Now put all of the values together and hand the file to your developer for implementation.

    Events Reporting

    After your development team implements the new tag, navigate to Behavior > Events to verify the tracking. Below is a screenshot from the day after I implemented 5 Events.
    events-report-google-analytics

    There’s a problem with this report. Event report conversion rate takes both shares and submissions into account – that’s not ideal. Each of these actions hold different weights and shouldn’t be looked at as equal conversions.

    That’s why Google Analytics gives you the ability to create Goals based on Events.

    Goal tracking is more robust than Events. Goal reports display for better conversion data, segmentation and reporting options.

    goal-reporting-options


    Part Two: Turning Events into Goals

    1. Select proper Account / Property in Google Analytics
    2. Navigate to Admin > Goals
    3. Click “New Goal”
    4. Under “Acquisition” click the radio button for “Create an Account”
    5. Name the goal and select the “Event” radio button
    6. You will be given four categories

    Category
    Action
    Label
    Value

    Look familiar?

    creating-google-goals-out-of-events

    These are the same parameters we set in our JavaScript snippet.

    onClick=”ga(‘send’, ‘event’, { eventCategory: ‘Contact ‘, eventAction: ‘Submit’, eventLabel: ‘Contact Page Form’, eventValue: 50});”

    All you have to do is enter the values we created earlier.

    Category = Contact
    Action = Submit
    Label = Contact Page Form
    Value = 50

    That’s it! Your custom Event will now be tracking as a Goal. You can now view more in depth data in the Conversion reports.

    goal-reporting-google-analytics

    Summary
    Article Name
    How to Create Custom Events & Goals in Google Analytics
    Description
    Custom Events lack the reporting that Goals do in Google Analytics. This post shows you how to code your JavaScript file then turn it into a Goal.
    Author
    Publisher Name
    WEBRIS
    Publisher Logo
    12 5.00 RATE THIS
    RATE THIS

    12 Comments

    1. Google analytics I see has more customization options than I ever realized. I will have to examine this closer.

    2. Google Analytic s can be tricky to use, this is some really good advise on events. Thanks for adding the JavaScript for creating custom events, but, its good to know I can just hire you! lol

    3. Their are a lot of different elements to custom events. I think I will take a look more at this. I do know a little about coding so I think I could attempt the step by step. If not their is Ryan to the rescue.

    4. Google analytics is a tool that must be mastered by internet marketers. It helped many marketers in formulating marketing strategies.

    5. Internet marketers need to equip themselves with Google analytics. The data presented Google analytics is helpful to promote the business via the internet.

    6. I never realized that Google Analytics could do so much. Thank for this informative information.

    7. I never ever knew you could turn events into goals. Man I’ve been sleeping on this great resource. Thanks for opening my eyes!

    8. Thanks for breaking every thing down. I have been struggling to grasp google analytics understanding.

    9. I never realized there was a problem with events reports in Google analytics. Thanks for pointing that out.

    10. I don’t know how you learn all this stuff but you are a true pro at what you do. No rehashed garbage here!

    11. This doesn’t work if I do a validation after submitting and only want to track the successfull ones.

      I know that I cannot put an onload event to a tag.

      Do you have any idea how to solve this?

    12. Awesome Ryan, I hope this works for me now!

    Your email address will not be published. Required fields are marked *

    HOW DOES YOUR WEBSITE STACK UP?
    CLICK TO TRY OUR [FREE] SITE GRADER.

    Want More Traffic?

    GET [FREE] WEBSITE GRADE