What is an event and how is it detected?

An event is an action taken by a visitor on your site or app, like a page view, download, outlink, custom event, goal conversion, ecommerce conversions and so on. Usually, one tracking request turns into one event. However, there are some cases where one event can lead to another event. For example, if someone visits a thank-you page, that action could lead to a page view event and a goal conversion event (if you’ve set up goals that way).

In this article, we’ll talk about event types and how they are detected.

Event types

Here’s a list of all events that Piwik PRO tracks:

Basic events

Event name Tracked by default Description
Broken event An event that wasn’t processed correctly due to some error. Broken events are only reported in the tracker debugger and contain a message that can help you fix the problem.
Custom event

A visitor performs a custom event.

By default, Piwik PRO tracks as custom events: page scrolls and JavaScript errors. (Page scrolls can be turned off in Administration > Sites & apps > Data collection > Page scrolling > Measure scroll depth. JavaScript errors can be turned off in Tag Manager > Piwik PRO tag (tracking code) > UX issues > Detect JavaScript errors.)

Other custom events can be set up additionally.

Content impression

A visitor sees a custom popup or content.

It can be turned on in Tag Manager > Piwik PRO tag (tracking code) > Data collection > Interactions with popups and content.)

Content interaction

A visitor interacts with a custom popup or content.

It can be turned on in Tag Manager > Piwik PRO tag (tracking code) > Data collection > Interactions with popups and content.)

Custom ping Any ping that is sent by the user. For example, a custom ping to update a session-scoped custom dimension.
Download A visitor downloads a file.
Excluded event

An event excluded from reporting if you choose not to collect data from certain IP addresses or web crawlers (by blocking specific user agents).

Excluded events are only visible in the tracker debugger.

Goal conversion

A visitor completes a goal.

Goals can be turned on in Analytics > Goals > Add a goal. Read more

Heartbeat ping

A ping requests responsible for counting the time spent on a page.

You can turn off heartbeat pings in Menu > Tag Manager > Tags > Piwik PRO > Data collection > Count session time precisely (off). Read more

Internal search A visitor uses your internal search engine.
Outlink A visitor clicks the link to an external website.
Page performance metric ping A ping request responsible for calculating page performance metrics used in the page timing report.
Page view A visitor visits a page.
Event name Tracked by default Description
Consent form impression A visitor sees your site’s consent form.
Consent form click A visitor clicks on a button on your site’s consent form.
Consent decision A visitor makes a decision using your site’s consent form.

Ecommerce events

Event name Tracked by default Description
Abandoned cart A visitor abandons the cart.
Add to cart A visitor adds a product to the cart.
Ecommerce order A visitor buys your product.
Product detail view A visitor views a product detail page
Remove from cart A visitor removes a product from the cart.

SharePoint events

Action name Tracked by default Description
SharePoint Additional events tracked when you’re using SharePoint integration.

How an event type is detected

When the tracker processes a tracking request, it turns a raw log into an event. During this phase, the tracker figures out what kind of event it is. Once the tracker finds a match for the event type, it stops looking and doesn’t try to find more matches.

Here’s the order in which our tracker detects event types:

Step 1: Goal conversion

The first thing the tracker does to detect the type of event is to look for signs that the event resulted in a conversion. If the tracked event has an &idgoal parameter with a value other than 0, then it is classified as Goal conversion.

Step 2: Ping

Next, the tracker analyzes a &ping parameter and assigns one of the following types based on its value:

  • 1, 2 and 3 result in Heartbeat ping
  • 4 results in Deanonymization ping 
  • 5 results in Page performance metric ping
  • 6 results in Custom ping

Values that fall outside of that range will cause an error, which will result in Broken event.

Step 3: Download

The tracker then checks for a &download parameter. If it exists, the event is labeled as Download.

The tracker then checks if there is a &link parameter. If it is present, the event is categorized as Outlink.

Next, the tracker looks for an &e_c parameter. If this parameter has a value of 'consent_form_impression', the event is labeled as Consent form impression.

If the &e_c parameter has a value of 'consent_form_click', the event is labeled as Consent form click.

If the &e_c parameter has a value of 'consent_decision', the event is labeled as Consent decision.

Step 8: SharePoint

Next, the tracker looks for SharePoint events. An event is classified as SharePoint if two of the following occur:

  • The custom variable 1 key equals 'ppas.sharepoint.plugin'.
  • The &e_c parameter equals 'download' or 'search'.

Step 9: Custom event

Next, the tracker checks if there are two parameters: &e_c and &e_a. If both are present, then the event is marked as Custom event.

Step 10: Content interaction

If the &c_i and &c_n parameters are present, the tracker will classify the event as Content interaction.

Step 11: Content impression

If only the &c_n parameter is present (but there’s no &c_i), the event is labeled as Content impression.

Step 12: Cart update

Next, the tracker looks at the other parameters. If the &idgoal parameter is 0 and there’s no &ec_id parameter, or the &e_t parameter has a value of 'cart-update', the event is categorized as Cart update.

Step 13: Product detail view

If the &e_t parameter has a value of 'product-detail-view', the event is marked as Product detail view.

Step 14: Add to cart

If the &e_t parameter has a value of 'add-to-cart', the event is marked as Add to cart.

Step 15: Remove from cart

If the &e_t parameter has a value of 'remove-from-cart', the event is marked as Remove from cart.

Step 16: Order completed

If the &idgoal parameter is 0 and the &ec_id parameter is present, or the &e_t parameter has a value of 'order', the event is marked as Order completed.

The tracker checks then for search parameters. If the &search parameter is present in the tracking request or a search term is present in the URL parameter, the event is labeled as Internal search.

Step 18: Page view

If the tracker didn’t detect an event type in the previous steps, the event is labeled as Page view.

Other events

Here are events that aren’t detected in the way described. They are the result of the post-processing of an event or a session.

Abandoned cart

If the tracker detects Cart update, Add to cart or Remove from cart but none of them is followed by Order completed, it’ll create a virtual event Abandoned cart. Additionally, it’ll record the cart state and calculate the lost revenue.

Excluded event

If you choose not to collect data from certain IP addresses or web crawlers (by blocking specific user agents), any event that meets the defined criteria won’t be included in reports, but it will still be tracked and labeled as Excluded event.

Excluded events are only reported in the tracker debugger.

Broken event

If an error occurs while processing an event, it will be labeled as Broken event. This can happen if the &idgoal parameter is wrong or if the &idsite doesn’t exist.
 
Broken events are only reported in the tracker debugger and contain a message that can help you fix the issue.

Was this article helpful?

Technical support

If you still have any questions, visit our community.
There’s always someone happy to help!

Back to help center