1. Home
  2. Integration & Setup
  3. Practice tips & guid...
  4. Sample Concept for eComme...
  5. General Event Tracking

General Event Tracking

In addition to page views, eCommerce events and onsite campaigns, any other interactions, i.e. clicks on links or items on the website, can be measured via events. Examples of events include downloads of PDF documents, views of images, external links, filtering functions on search results or category pages.

External links including social media link views as well as downloads of documents and image files can be automatically detected by etracker and tracked as an event.

No additional JavaScript code needs to be implemented for this. Automatic recording is activated by default, but can be deactivated in the etracker application under Settings – Statistics Settings – Automatic Recording of Events.

Other events are not automatically measured using the traditional tracking code. In addition to the etracker code, you need a JavaScript function that dynamically triggers the counting of interactions. To capture more events, install the appropriate JavaScript code to dynamically trigger the counting in the appropriate location on the website you want to record.

Note:
All values must be passed in URL-encoded format (RFC 3986) according to the ISO standard, especially if they contain special characters.

Event Examples in Shops

The following events are available for most shops:

  • Login: The login of a visitor can be recorded including the UserID or the unsuccessful login attempt.Successful login:Here “et_AuthenticationSuccessEvent(eventObject)” will be transferred as a category and the UserID/successful as the object.Unsuccessful login:Here “et_AuthenticationFailureEvent(eventObject)” will be transferred as the category and the UserID/unsuccessful as the object.The login of a visitor can be recorded including the UserID or the unsuccessful login attempt.
  • Download: The download of various files can be recorded. “et_DownloadEvent(eventObject)” will be chosen as the category and the filename can be transferred as the object.

Integrating Event Tracker

The event tracker is delivered with the default JavaScript code of etracker and can be integrated as follows: Example PDF call:

<a href="http://www.mysite.de/test.pdf" onmousedown="_etracker.sendEvent(new et_DownloadEvent(‘My%20PDF’))">PDF-Download</a>

Example button for starting a film:

<input type="button" value="Start film" onmousedown="_etracker.sendEvent(new et_VideoStartEvent(‘Film1’))">

Event Tracker functions:

JavaScript functionDescription
et_DownloadEvent(eventObject)Recording downloads of documents
etClickEvent(eventObject)Recording clicks on elements
et_LinkEvent(eventObject)Recording clicks of internal and external links
et_AuthenticationSuccessEvent(eventObject)Recording a successful login
et_AuthenticationFailureEvent(eventObject)Recording an unsuccessful login
et_AuthenticationLogoutEvent(eventObject)Recording a successful logout
et_AudioStartEvent(eventObject)Recording the start function of a music player
et_AudioStopEvent(eventObject)Recording the stop function of a music player
et_AudioPauseEvent(eventObject)Recording the pause function of a music player
et_AudioMuteEvent(eventObject)Recording the mute function of a music player
et_AudioSeekEvent(eventObject)Recording the playback function of a music player
et_AudioNextEvent(eventObject)Recording of the Next function of the music player
et_AudioPreviousEvent(eventObject)
Recording of the Back function of the music player
et_VideoStartEvent(eventObject)Recording the start function of a video player
et_VideoStopEvent(eventObject)Recording the stop function of a video player
et_VideoPauseEvent(eventObject)Recording the pause function of a video player
et_VideoMuteEvent(eventObject)Recording the mute function of a video player
et_VideoSeekEvent(eventObject)Recording the playback function of a video player
et_VideoNextEvent(eventObject)Recording of the Next function of a video player
et_VideoPreviousEvent(eventObject)Recording of the Back function of a video player
et_VideoFullsizeEvent(eventObject)Recording the fullscreen function of a video player
et_VideoRestoreEvent(eventObject)Recording the normal screen function of a video player
et_GalleryViewEvent(eventObject)Recording the view of a picture
et_GalleryZoomEvent(eventObject)Recording the zoom function of a picture
et_GalleryNextEvent(eventObject)Recording the next function of a picture gallery
et_GalleryPreviousEvent(eventObject)Recording the back function of a picture gallery

Structure of an Event Tracker Call

In the etracker JavaScript, you will find the following function which sends the corresponding events:

_etracker.sendEvent(Event Object);

This universal function accepts every defined event object. The differentiation of the various events is thereby defined by the event objects. In the simplest case, these are generated directly in the function. It should however be generated with “new”.

Note: All of the elements to be defined will be marked in bold in the code examples.

JavaScript function with a click event:

_etracker.sendEvent(new et_ClickEvent(‘ExternalLink1’));