Security, Privacy, AI and CSR information for all Piano products now lives in one place. Explore our Compliance Center.
Analytics
English French
English French

Event scope or visit scope?

A scope defines how far a value travels. With an event scope, a value applies to a single event. With a visit scope, it applies to every event of the visit. Knowing which one you are working with helps you explain why a report shows a given number, and choose the right option when you build a segment or a custom metric. A third scope, pageview, sits between the two for properties.

For example, a visit starts from a newsletter link, then the visitor loads three pages. The "Source" property shows the newsletter on all four events (visit scope), while the "Page" property shows a different page on each page load (event scope).

Properties

Every property has a scope. It determines whether the value changes from one event to the next.

  • Event scope: the value exists only for the event it is sent with. For example, "Page" can change each time a page loads.

  • Visit scope: the value is propagated to all the events of the visit. For example, "Source" keeps the same value whatever event you analyze. When several sources are received during a visit, only the first one is kept.

To check the scope of a property, hover over the i icon next to it in a report, or go to Data Management > Data Model > Properties, select the property, and open its details. To learn how a scope is assigned (first value, last value) and when it applies retroactively, see Property scopes.

Metrics

Metrics follow the same logic. A visit-scope metric keeps the same value within a visit, while an event-scope metric can change with each event.

  • Page Views counts the page loads made during the visit, so the number changes according to the element you analyze.

  • Visits and Bounce Rate are calculated on complete visits, not event by event.

Combine scopes with care. For example, "Transaction ID" only has a value on the transaction confirmation event, while a metric such as "Turnover (visits)" is reported at visit level. If a table shows turnover on a row with no "Transaction ID", that row is an aggregate. Filter out the empty values to avoid counting the same revenue twice.

Segments

Segments offer seven scopes, so you can choose between keeping whole visits or only the matching events:

  • Visit: identifies one or more criteria and reports all the events of the visits that match.

  • Visitor: identifies one or more criteria and reports all the events of the visitors that match.

  • User: identifies one or more criteria and reports all the events of the users that match.

  • Event: identifies one or more criteria and reports only the events that match. This scope works like a filter.

  • Audio/video session: reports the events that match during a single av_sessionid.

  • Cart: reports the events that match during a single cart_id.

  • Page: reports the events that match during a single pageview_id.

For example, you want to analyze the "Added to cart" events for product PRO001. With a visit scope, the segment keeps every visit with at least one of those events, so add-to-cart events for other products in the same visits also appear. With an event scope, only the add-to-cart events for PRO001 remain.

If a segmented count looks higher than expected, check the scope first. A visit scope returns all the events of the matching visits, including events that don't carry the value you filtered on.

The scopes of a segment are detailed in Segmentation engine | The different scopes of the segmentation.

Last updated: