Skip to content

Event Tracking

Content
Automatic event capture etracker tag manager Event tracking with JavaScript User-defined events Download Link-Click Rich Media Events View Events

In etracker, not only page views, but also any other interactions of website visitors with page elements and the display (views) of page elements can be recorded and analyzed.

Please note:

Every measured event interaction is counted towards the hit quota. Event measurement should therefore only be used for targeted usability and conversion optimization.

Automatic event capture

Many interactions – such as scrolling, external links, downloads or video views – are automatically recorded as events in etracker analytics, unless this has been deactivated. To adjust the automatic recording, go to Account → Automatic recording → Events. Scrolling is activated under Data protection → Automatic scroll tracking customized.

etracker tag manager

In addition, user-defined events can also be set up on the website without integrating additional code in HTML using the etracker tag manager.

Event tracking with JavaScript

Alternatively, you can also implement special JavaScript in the website to capture custom events:

Please note:
  • All values must be transferred in URL-encoded format (RFC 3986) in accordance with the ISO standard, this applies in particular to special characters.
  • The page on which the event is triggered is automatically recorded with the page name (corresponds to the page title by default) and URL as well as URL path (area assignment) and does not have to be transferred additionally.

User-defined events

To send an event, simply insert the following snippet into an HTML tag:

Send event html
onmousedown="_etracker.sendEvent(new et_UserDefinedEvent('Objektname', 'Kategorie', 'Aktion', 'Typ'));"

The parameters are all freely definable character strings and correspond to the respective report dimensions or segments. The “Action” and “Type” parameters are optional.

User-defined event html
<a href="http://www.meineseite.de/test.pdf" onmousedown="_etracker.sendEvent(new et_UserDefinedEvent('myObject', 'myCategory', 'myAction', 'myType'));">PDF-Download</a>

Download

Example html
<a href="http://www.meineseite.de/test.pdf" onmousedown="_etracker.sendEvent(new et_UserDefinedEvent('test.html', 'Download', 'Anleitungen', 'PDF'));">PDF-Download</a>

Link-Click

Example html
<a href="http://www.meineseite.de/link.html" onmousedown="_etracker.sendEvent(new et_UserDefinedEvent('Links.html', 'Links', 'Click', 'Link'));">Link-Click</a>

The automatically recorded events are assigned to the dimensions as follows:

KategorieObjektAktionTyp
LinksAufgerufener LinklinkExternal Link
Social Media
Mailto Link
Phone
DownloadDatei (Name und Endung)downloadDownload
VideoDatei (Name und Endung)start
stop
playtime
-

Rich Media Events

Special event functions are available for recording the use of multimedia content (audio and video) in order to be able to evaluate the playing time in addition to the interactions. Please note that playable media are measured by default via automatic event recording.

Example button to start a movie:
<input type="button" value="Film starten" onmousedown="_etracker.sendEvent(new et_VideoStartEvent('Film1','Produktvorstellung'))">

The transfer using the event tracker functions is as follows:

JavaScript Funktion Beschreibung
et_AudioStartEvent(eventObject,eventType) Messung der Startfunktion eines Musikplayers.
et_AudioStopEvent(eventObject,eventType) Messung der Stopfunktion eines Musikplayers.
et_AudioPauseEvent(eventObject,eventType) Messung der Pausefunktion eines Musikplayers.
et_AudioMuteEvent(eventObject,eventType) Messung der Stummschaltefunkt. eines Musikplayers.
et_AudioSeekEvent(eventObject,eventType) Messung der Abspielposition eines Musikplayers.
et_AudioNextEvent(eventObject,eventType) Messung der Weiterfunktion eines Musikplayers.
et_AudioPreviousEvent(eventObject,eventType) Messung der Zurückfunktion eines Musikplayers.
et_VideoStartEvent(eventObject,eventType) Messung der Startfunktion eines Videoplayers.
et_VideoStopEvent(eventObject,eventType) Messung der Stopfunktion eines Videoplayers.
et_VideoPauseEvent(eventObject,eventType) Messung der Pausefunktion eines Videoplayers.
et_VideoMuteEvent(eventObject,eventType) Messung der Stummschaltefunkt. eines Videoplayers.
et_VideoSeekEvent(eventObject,eventType) Messung der Abspielposition eines Videoplayers.
et_VideoNextEvent(eventObject,eventType) Messung der Weiterfunktion eines Videoplayers.
et_VideoPreviousEvent(eventObject,eventType) Messung der Zurückfunktion eines Videoplayers.
et_VideoFullsizeEvent(eventObject,eventType) Messung der Vollbildfunktion eines Videoplayers.
et_VideoRestoreEvent(eventObject,eventType) Messung der Normalbildfunktion eines Videoplayers.

View Events

The ViewEvent function should be used to send a view event:

Send view event html
etracker.sendEvent(new et_ViewEvent(myObject, myType));

To ensure that the etracker code has been loaded before the ViewEvent is sent, the ViewEvent function should be called with the following _etrackerOnReady so that the ViewEvent finally looks like this:

html
var _etrackerOnReady = typeof _etrackerOnReady === 'undefined' ? [] : _etrackerOnReady;
_etrackerOnReady.push(function() 
{ _etracker.sendEvent(new et_ViewEvent(myObject, myType)); 
});

The Category and Action parameters are automatically filled with “View” and “view” respectively.