Setting up goals and events in analytics can be extremely beneficial to measuring interactions and conversions on your site. This allows you to see exactly where people are interacting on your site and where to attribute your conversions. We will start by defining each piece and then how to create and track them.
What qualifies as an event vs. a goal?
A goal is a conversion on your site. This can be a micro conversion like signing up for a newsletter or subscribing to your blog or a macro conversion like a lead or order completion. This will allow you to see each conversion by any segment, plus play around with some interesting attribution models.
An event is a user interacting with an important link on your site. Some examples are: your social links (fb, twitter..etc), the careers page, about us, blog, store locator….etc. This allows you to see how users from different traffic sources (any segment really) interact with your site.
How do I set up a goal?
To set up a goal, first define what you want to track. Let’s use a transaction for this example.
- First, select the Admin tab. Second, select your property and view, and finally click Goals.
- Click “+ New Goal”. Add a name and the type of goal. For this example I am going to call it “Order Completion” and select the type “Destination”. See here for the definition of each of the types: https://support.google.com/analytics/answer/3046660?hl=en
- Next we are going to enter the destination URL of the confirmation page a user hits after they make a purchase, and enable Value (but leave blank).
How do I set up an event?
To set up an event, first define what attributes on your site you want to track. For example, let’s track when someone clicks on our social buttons, which are Facebook, Twitter, and YouTube.To set these up we are going to create 3 separate event tags which will be placed in the link portion of the HTML. You need to define at least 2 values (category and action) to make this work properly. Please see here for more details: https://developers.google.com/analytics/devguides/collection/analyticsjs/events
ga('send', 'event', 'Category', 'Action', 'Label', Value);
<a onClick="ga('send', 'event', 'Nav', 'Facebook', 'Social');" href="http://www.facebook.com/mypage">
<a onClick="ga('send', 'event', 'Nav', 'Twitter', 'Social');" href="http://www.twitter.com/myusername">
<a onClick="ga('send', 'event', 'Nav', 'Youtube', 'Social');" href="http://www.youtube.com/mychannel">
Where do I see my goals and events in Analytics?
To see your goals and events we are going to navigate the left-hand column. To see events we are going to select the Behavior tab > Events > Top Events > the dimension you would like (category, action, or label).
To see goals select the Conversions tab > Goals > Overview. If you set up e-commerce tracking you can also see transactional performance in the e-commerce Overview tab.
As a bonus, consider adding scroll depth to your page if you have really long pages or a blog. This allows you to see how far down the page a user got before exiting the site.