Collecting events
Events collect click and impression data on specific elements of a page (links, buttons, blocks…) that a standard tag fired when the page loads cannot capture.
Important
Events are an obsolete measurement in Eulerian. They have been replaced by Actions, described in Action tags and conversion tracking, which are now the recommended way to measure interactions. Read that page before implementing events.
Prerequisites
Events must be fired on a page where the Eulerian tag is already implemented (the ea.js library must be loaded).
How it works
- Each event call collects one interaction, with no notion of a delay between two calls.
- Events are generated dynamically: there is no need to declare them in the interface.
- If a user goes through a page containing an event and then places an order, the number of sales and the revenue associated with that event are incremented.
- Events can also serve as triggers for sending data to a partner through Eulerian DMP.
1 · Click events
These track interactions with an element of the page: a link, a button, a download or a generic event.
Syntax
| Type | Function |
|---|---|
| Link | EA_push('link', ['NOM-EVENT']) |
| Download | EA_push('download', ['NOM-EVENT']) |
| Button | EA_push('button', ['NOM-EVENT']) |
| Simple event | EA_push('event', ['NOM-EVENT']) |
Examples
Fired through onclick on a download link:
<a href="https://mon-lien.fr" onclick="EA_push('download', ['telechargement-pdf']);">
Texte du lien
</a>
Fired through a standalone JavaScript script:
<script type="text/javascript">
EA_push('download', ['telechargement-pdf']);
</script>
Note
This tag must be called on every click on the tracked element.
2 · Impression events (eventview)
These track impressions of elements available on the page when it loads, through the eventview parameter.
Syntax
EA_push([
"path",
"nom-de-page",
"eventview",
"NOM_EVENT_1",
"eventview",
"NOM_EVENT_2",
]);
Example · tracking impressions of 2 downloads when the page loads
EA_push([
"path",
"homepage",
"uid",
"totoq213213",
"eventview",
"download-pdf-1",
"eventview",
"download-pdf-2",
]);
This call feeds the “imp” KPI in the Events report for each eventview declared, every time the page loads.
3 · Product events
These track an interaction associated with a specific product.
Common use cases:
- Clicking a product’s video
- Selecting the size or colour of an item
- Tracking product recommendation blocks
- Promoting a product, or promotional blocks
How it works
A call containing the event name and the product reference is sent on each interaction. The data feeds the Product event list report.
If a user clicks a product event but their order does not contain that product, no sale is counted. The sale is attributed to the event only if the associated product reference is present in the order. This logic is particularly well suited to tracking cross-selling.
Syntax
| Type | Function |
|---|---|
| Link | EA_push('productlink', ['REF_PRODUIT', 'NOM_EVENT']) |
| Download | EA_push('productdownload', ['REF_PRODUIT', 'NOM_EVENT']) |
| Button | EA_push('productbutton', ['REF_PRODUIT', 'NOM_EVENT']) |
| Simple event | EA_push('productevent', ['REF_PRODUIT', 'NOM_EVENT']) |
Examples
Fired through onclick:
<a href="http://www.exemple.com" onclick="EA_push('productdownload', ['ref-produit-123', 'telechargement-pdf']);">
Texte du lien
</a>
Fired through a standalone JavaScript script:
EA_push("productdownload", ["ref-produit-123", "telechargement-pdf"]);
Note
This tag must be called on every click on the tracked element.