What are events and how are they detected?

Video tutorial: watch on YouTube

An event is an action performed by a visitor on your site or app. This includes things like viewing a page, downloading a file or clicking a link.

A single tracking request will typically result in a single event. However, there are cases where a tracking request will generate multiple events. For example, if someone visits your thank-you page, that action could generate a page view event as well as a goal conversion event (if that’s the way you’ve set up your goals).

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

Event types

Here’s a list of all the 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 information to help you fix the problem.
Custom event

A visitor performs a custom event.

By default, Piwik PRO tracks page scrolls and JavaScript errors as custom events. (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.)

You can set up other custom events as needed.

Content impression

A visitor sees a custom popup or content.

This event 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.

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

Custom ping Any ping request sent by the user. For example, a custom ping request 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 request that tracks the time spent on a page.

You can turn off heartbeat pings in Menu > Tag Manager > Tags > Piwik PRO > Data collection > Measure session duration 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 that calculates the 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 use SharePoint integration.

How event types are detected

When the tracker processes a tracking request, it turns a raw log into an event. As it does this, it 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 it’s dealing with is look for signs that the event resulted in a conversion. If the tracked event has an &idgoal parameter with a value other than 0, 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 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 Download.

The tracker then checks to see if there’s 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 the value 'consent_form_impression', the event is labeled Consent form impression.

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

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

Step 8: SharePoint

Next, the tracker looks for SharePoint events. An event is classified 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 for the presence of the following two parameters: &e_c and &e_a. If both are present, the event is marked as Custom event.

Step 10: Content interaction

If both &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, the event is labeled 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 the value 'cart-update', the event is categorized as Cart update.

Step 13: Product detail view

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

Step 14: Add to cart

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

Step 15: Remove from cart

If the &e_t parameter has the value '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 the value 'order', the event is marked as Order completed.

The tracker then checks 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 Internal search.

Step 18: Page view

If the tracker detected no event types in the previous steps, the event is labeled Page view.

Other events

Here are the events that aren’t detected as described above. They are the result of post-processing of an event or 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 named Abandoned cart. Additionally, it’ll record the state of the cart 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 Excluded event.

Excluded events are only reported in the tracker debugger.

Broken event

If an error occurs while processing an event, the event is labeled 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 information to 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