10 Google Analytics Custom Event Samples That You Can Use on Your Own Website

written by
| in group
|updated on
January 9, 2019

Google Analytics is becoming a powerful and valuable tool for the webmasters. Using the tool provides website owner the convenience of easily tracking down ecommerce transactions, events and SEO campaigns as among others. The best part is Google Analytics is a free tool that remains incomparable to other paid analytic programs in the market today. Learning how to customize the custom events of Google Analytics on your own website will help you expand your ability to optimize your website traffic and performance. Here are 10 Google Analytics custom events samples that might be helpful in optimizing your own website performance.

1.Learning to use the tracking code for the Google Analytics Custom Events

The custom event feature of Google Analytics requires one to tinker with the codes thus it is a basic requirement to understand and learn the purpose of the tracking codes that will be used for adding the HTML codes to your own website. The event tracking in the tool uses the ga.js tracking code which is essential in recording the interaction of its users to the elements used in the website, the most common of which include the following:

  • Page gadget element
  • Flash driven element
  • AJAX embedded element
  • File downloads

The most common tracking codes that you need to understand include the following terms:

  • Value – this will provide you the flexibility of adding parameters to your website such as price, category and time codes.
  • Google Analytics push – this is the tracking code in the form of “_gag.push()” connecting your web page HTML to the Analytics data.
  • Action – this reflects how your visitors interact with your tracked web page in terms of clicks, views and length of stay
  • Category – this organizes your tracked event according to their category whether it be a link, video or an ad.
  • Label – you can opt to use this code to track down the custom events by name or label.
  • Interaction – this will reflect whether an event can be productive to your website performance / bounce rate.

2.Setting up the event tracking code

Setting up the event tracking code to your website is necessary to be able to view the report of the custom event being tracked down. You can use the source code for the custom event by using the _trackEvent () code. Keep in mind that using the category and action codes are required to be included in the tracking code while the label, interaction and value are merely optional. Thus, your default tracking code should be:

_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

Once the code is set-up on your website, you are now ready to view the report from the “content” section and then view the “Event Tracking.”

3. Tracking the custom event for lightbox conversions

You can track down the custom event activities when using lightboxes or pop up codes that will not redirect your website visitors to another URL by using this code to your website:

_gaq.push([‘trackEvent’, ‘Research Guides’, ‘Download’, ‘Business Careers’])

Using this custom event feature benefits

You can dynamically provide a “thank you” message on your site each time a customer completes filling up a form or performs an action such as registering to your site. You can use the track code to understand the conversion rate metrics on your website.

4.Track down errors on your website forms

You can also integrate the events tracking code of Google Analytics to your registration forms and also on the check out forms which are actions performed by your website visitors that can be valuable to you.  By tracking this activity, you can easily spot the errors commonly experienced by your website visitors when filling out forms. You can use this code to track down possible errors that can be barrier to the conversion rate of your site.

Optimizing the use of this custom event

  • Your form must have a series of custom events that will represent a specific field.
  • The category should flag the errors for a particular form.
  • Define an action for every field in the form.
  • Use a dynamic label to provide specific description to easily track down the error and the value entered with critical errors.
  • Evaluate the common values where errors are commonly entered by your visitors

5.Reviewing the clicks on your links

If you are an affiliate marketer, you will likely use an HTML code from your affiliate network. This is important in tracking down your conversion links to keep track of your sales, leads generated and payments. Using the Google Analytics custom event tracking code will offer you a more convenient solution to track down which affiliate links are more productive from your site.

Steps in tracking down your affiliate links

  • Add an on-click event to each of your affiliate link on your site.
  • Label the custom event to distinguish one affiliate link to another.

6.Track down your visitor’s engagement to your video posts

Video marketing is commonly used by webmasters on their site and the Google Analytics tool can provide you custom event feature that can help you track down how your video performs in engaging your website visitors. Sometimes, some of the videos that you embed to your website cannot be tracked down by an analytic tool as it runs independently like YouTube. The custom event tracking code can help you evaluate the engagement rate of your website videos to your visitors by using the code:

_gaq.push([‘trackEvent’, ‘video’, ‘Play’, ‘name of the video’])

Benefits of tracking this custom event:

  1. Track down plays, stops, rewinds, starts and other actions performed by your viewers from your video player.
  2. Using specific label (title of the video) will help you identify which video is converting and those that is not.

7.Custom event tracking for content consumption

An often neglected aspect when tracking down a website performance is monitoring the website content engagement to the website visitors. While Google Analytics has its own social tracking feature, integrating the custom event feature to monitor your content engagement to your visitors is something that you can do to help you understand easily how your readers react to your content. It is like understanding whether a viewer spent the time to read your content and to measure how long a viewer scrolls down to read a specific web page on your site. The code will provide a value between 1 and 100 which will reveal whether your website visitor stay longer to read a page content and if they merely took a quick glance at your content and them leave the page without reading.

Using the custom event of tracking down content engagement to your site

  1. Load the event using the code _gaq.push([‘trackEvent’,’Consumption’,’Article Load’,'[URL]’,100, true]).
  2. The 100 is the value while the URL is the label to monitor a specific content on your website.
  3. Set the non-interaction value as true.
  4. Set up a second custom event as the viewer of your content first scrolls down on the web page. This time change the value to “75” and then remove the non-interactive “true.”
  5. Set up a third event which will again track down the user activity as your viewer reaches down to the bottom of your web page. Change the value to “25.”
  6. You can now export all the values of the tracked events from your blog content and you can now index your content consumption. The one indexed with the lowest value shows more engaging content to your content viewers.
8.Tracking custom events for embedded maps

If you are using maps on your website, this sample for tracking custom events will help you obtain reports on the number of people who are using the map to find directions to your business. It can possibly work like the Google + Local app that will help you identify how your online maps can drive sales for your offline business. However, while Google may allow you to embed their map listing to your own website, it is not possible to embed codes to monitor the clicks for requesting directions from your map directly. To remedy this issue, your recourse is to create your own custom map using the MobileFish API Utility to acquire your own map code to be embedded on your website. You can easily format HTML codes for your custom map that can be easily intergrated with custom event tracking.

Create your own custom map from MobileFish API Utility:

Create your own custom event tracking code

  1. Use the API key generated from the custom map you created from MobileFish and tweak the settings in order for the map embed to show as intended.
  2. Create an HTML link to the directions for driving on the white callout text that is similarly shown as in the Google + Local.
  3. Wrap the HTML link to “onclick” event together with your custom event code : _gaq.push([‘trackEvent’,’Maps’,’Driving Directions’,’Bloomington’])

9. Custom event rank tracking

This custom event sample will help you obtain reports on the organic rank of your website. Every single script on your web page will be analyzed by the Google Analytics by organic rank tracker. The custom event tracking code will be:

_gaq.push([‘trackEvent’,’Rank Tracker’,'[Keyword]’, ‘[URL]’, [Rank], true])

Using the custom event for organic rank tracking

The custom event can track down every single page of your website. You can insert the code either through the page header or footer and the script will be triggered each time the web page loads. This will look into the URL of the destination on the viewing activity on your web page and will include the referring string of the Google search URL. Some of the extracted values include the keyword used in Google which will be reflected in the custom event “action” and in the “label” will appear the URL destination. The custom event then also tracks down the organic ranking which will appear on the “value” field. Make sure to include the non-interaction value of “true” in the field in order for Google Analytics not to factor each firing of the event against the bounce rate.

10. Custom event tracking for conversion rate optimization variations

If you are into digital marketing optimization for your website, you will need an onboard tracking system to allow you to record the variation of contents that are being received by your online visitors. Using the custom event tracking for conversion rate optimization variation will help you undertake a deeper analysis on your optimization process. You need to use this code for this custom event sample:

_gaq.push([‘trackEvent’,’Optimizely’,’Variation’, ‘Test-HP-007-a’, true])

Steps in using this custom event

  1. Load the HTML code for this custom event for every variation in your test.
  2. Indicate the differences in the variations in your test to the “label” field.
  3. Make sure use true in the non-interaction value in the custom event to exclude the engagement of your user to your content.

This custom event sample when used on your website will provide you an overview on the gains you have acquired from lead conversion to the sales process on your website.

Stacy Carter is a technology writer and seo blogger.

One Comment

  1. john58975 says:

    I was working on GA & setup the tracking code on it but it does not track anything. Its custom events reports shows zero tracking. Can you tell me what to do? I have heard about GoStats that it works much better then GA.

Copyright BloggersPassion © 2009-2019 | Privacy Policy | Disclaimer

We're Hosted on WPX Hosting