Skip to main content

Tracking custom events

Written by Kateřina Irová

Tracking custom events that happen on your site is very easy with Ecomail, just use this short piece of code:

window.ecotrack('trackStructEvent', 'category','event','label','property','value');

Here is a specific example of an event, a video playing on your page:

window.ecotrack('trackStructEvent', 'Videoplayer', 'Play', 'Wedding-video.mpg', '', '0.0');

You can use custom events in segmentations (User Activity -> Custom Event) and automations (Custom Event trigger).

In segmentation you can set a condition to display only specific categories from your e-shop if you send us custom events with adequately filled fields (see table above).

To automate or trigger a custom event, the following values are needed: category, event, label.

Did this answer your question?