Error Meta Event

Introduction

The first thing you should know about about (M) meta events is that these events are not collected automatically. You have to define what you consider an error and when to collect them.

A common use case is to collect error messages that are displayed to users. Most likely, all forms on your website have some kind of validation – either on the front-end or on the backend of your website. For example, if a user provides wrong login details, the form validator shows a message “Wrong email or password”.

To register an Error meta event, you can use the JavaScript API method:

uDash.saveMeta('Error','Wrong email or password');

You can set up tracking of errors using Triggers in the panel without modifying code base of your website.

Collecting JavaScript or Server Response Error Codes

If you are interested in tracking of technical errors, you can set up a JavaScript listener:

<script>
window.onerror = function(message, url, lineNumber) {  
  uDash.saveMeta('Error',message+" in "+url+" ("+lineNumber+")");
  return false;
}; 
</script>

Related Data Points

Errors Attribute

Every visit has an (A) Errors attribute which contains the number of all (M) Error meta events that were registered during that visit. For example:

Errors=3