Event Tracking
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.
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
In addition to scrolling, the following user interactions are also automatically recorded as events in etracker analytics, unless you have deactivated them:
- Social media links (Twitter, Xing, LinkedIn, YouTube, Facebook, Instagram, Pinterest, Tumblr)
- Other external links incl. telephone and mailto links (without social media)
- Document downloads (Word, Excel, PowerPoint, Open Office, Pages, Keynote, Numbers)
- PDF downloads (.pdf, .pdfx)
- Image downloads (gif, jpg, jpeg, jpe, png, svg, tif, tiff)
- Media downloads (.mp3, .mp4)
- Playable media (videos, podcasts, music)
- Downloads of other formats (zip, csv)
- Downloads of user-defined formats (file extension with dot e.g. .psd)
To customize the automatic capture, go to Account → Automatic recording → Events. Scrolling is configured 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:
- 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:
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.
<a href="http://www.meineseite.de/test.pdf" onmousedown="_etracker.sendEvent(new et_UserDefinedEvent('myObject', 'myCategory', 'myAction', 'myType'));">PDF-Download</a>
Download
<a href="http://www.meineseite.de/test.pdf" onmousedown="_etracker.sendEvent(new et_UserDefinedEvent('test.html', 'Download', 'Anleitungen', 'PDF'));">PDF-Download</a>
Link-Click
<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:
| Category | Object | Action | Type |
|---|---|---|---|
| Links | Called link | link | External Link Social Media Mailto Link Phone |
| Download | File (name and extension) | download | Download |
| Video | File (name and extension) | 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.
<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 function | Description |
|---|---|
| et_AudioStartEvent(eventObject,eventType) | Measurement of the start function of a music player. |
| et_AudioStopEvent(eventObject,eventType) | Measurement of the stuffing function of a music player. |
| et_AudioPauseEvent(eventObject,eventType) | Measurement of the pause function of a music player. |
| et_AudioMuteEvent(eventObject,eventType) | Measurement of the mute function of a music player. |
| et_AudioSeekEvent(eventObject,eventType) | Measurement of the playback position of a music player. |
| et_AudioNextEvent(eventObject,eventType) | Measurement of the continued function of a music player. |
| et_AudioPreviousEvent(eventObject,eventType) | Measurement of the back function of a music player. |
| et_VideoStartEvent(eventObject,eventType) | Measurement of the start function of a video player. |
| et_VideoStopEvent(eventObject,eventType) | Measurement of the stuffing function of a video player. |
| et_VideoPauseEvent(eventObject,eventType) | Measurement of the pause function of a video player. |
| et_VideoMuteEvent(eventObject,eventType) | Measurement of the mute function of a video player. |
| et_VideoSeekEvent(eventObject,eventType) | Measurement of the playback position of a video player. |
| et_VideoNextEvent(eventObject,eventType) | Measurement of the continued function of a video player. |
| et_VideoPreviousEvent(eventObject,eventType) | Measurement of the back function of a video player. |
| et_VideoFullsizeEvent(eventObject,eventType) | Measurement of the full-screen function of a video player. |
| et_VideoRestoreEvent(eventObject,eventType) | Measurement of the normal picture function of a video player. |
View Events
The ViewEvent function should be used to send a view event:
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:
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.