Guides
Events in the Query Builder can be modified by introducing filters or by grouping results into different breakouts. These features make use of properties, which are typically sent along with the event data to describe characteristics of the events or the users who performed them.
When building queries, it’s important to keep in mind that Analytics will process the results very differently depending on the type of property used. This article is intended to illustrate the differences between event and user properties to help efficiently build queries that give the most accurate results.
When an event property is used in an analysis, Analytics will look at each individual event’s payload and reference the property associated with each event. The event property has the query ask “what was the value of the property at the time of the event?”, which is the most common scenario for most analyses.
User Properties are the properties associated with the user performing an event, such as demographic factors, an email address, or the marketing channel through which the user was originally acquired. While event properties can differ from event to event, user properties are associated with every event performed by a given user.
In order to enable user properties for use in queries, the Attribution Mode under Manage Data must be set to either first or last.
Consider the example table of events below:
NULL
, user 2’s will be Social
, and user 3’s will be Search
.Search
, user 2’s will be Social
, and user 3’s will be Search
.NULL
if this user property was configured for First attribution mode.Thus, user properties are selected to view results from users who performed a particular action, even if their first or last actions are beyond the scope of the analysis that has been created.
In the Analytics app, events can be filtered by event or user properties, grouped by those properties, or both:
In the finished analysis, the query row will indicate which type of property was used.
To better illustrate the differences between event and user properties in Analytics, consider the example of a query set to view the event BannerImpression
with the property Channel
, where the date range is equal to 8/17 - 8/20.
Here, filtering by “events’ Channel
equals Search
”, for example, would essentially pose this question: “Give me the total count of events performed between 8/17 and 8/20 where the property Channel
is equal to Search
. ”
The results, filtered by event property, would show one event.
Let’s say that the user property for Channel
is set to ‘Last Seen’. If the filter is set to “users’ Channel
equals Search
, the query instead asks: “Give me the total count of any events performed between 8/17 and 8/20 where the user who performed them had a last-seen value of Search
. ”
In this case, the results, when filtered by user property, would show five events: four performed by userID = 1, and one performed by userID = 5. userID = 1 shows up four times because they performed the BannerImpression
event within the time window, while having a last-seen value of Search
.
Because user properties focus more on the individual users than on the events, they can be useful for cases focusing on the user journey. Questions that might benefit from filtering or grouping by user properties might be:
When setting up A/B tests in Analytics, the best practice is to set up the data to use event properties, for several reasons:
Was this page helpful?