The For clause allows you to limit query rows to users who did or did not do a selected event before or after performing the initial event. It is a great way to examine users who performed more than one event in a sequence you can define in Indicative. Here's a simple example: you could use a For clause to view users who did "Subscribe" after "Email Clicked".
Available in: Segmentation
- A query row that already has an initial event
"For" Clause Basics
Creating a "For" Clause
To use a For clause, select an event from the Did [not] Perform data dropdown. Continue through the rest of this article for modifications that will provide you the flexibility to understanding your users.
Did vs Did Not Do
After selecting an event in the Did [not] Perform dropdown, decide whether you want to understand the data of users who did event or did not do this event. For example:
- Show the total count of events where users who did Subscribe also did Email Clicked at least once within the prior 7 days.
- Show the total count of events where users who did Subscribe did not do Email Clicked within the prior 7 days.
Note: Switch from Total count of to Users who performed to examine the count of users rather than the count of events but keep in mind that this is the dropdown that determines whether the query returns an event count or user count.
Adjusting Event Count
After adding an event using the For clause, you can adjust for the number of times users performed this event, such as greater than or equal to 1 time, less than 5 times, or greater than 3 times. For example, you can view the event count for users who did Subscribe, and also did Email Clicked greater than 3 times within the 7 days prior to subscribing.
Adjusting Date Range
After adjusting the event count, customize the date range. The first menu allows you to select whether the For clause event should have occurred prior to the initial event, subsequent to the initial event, or between two selected calendar dates. When using between, the second menu displays a calendar, allowing you to select a specific date range.
When using within the prior/subsequent, the second menu allows you to select a preset or custom count based on minutes, hours, days, weeks, or months.
Multiple "For" Clauses
Multiple For clauses may be added by selecting additional events from the Did [not] Perform dropdown.
As events are added, you can adjust the event count and date range of each additional For clause. When using a relative date range, the date range is always relative to the date of the base event in the query and not the other For clauses.
For example, you could view the event count for users who did Subscribe for users who also did Email Clicked 2 times or more within the prior 7 days, and also did Blog View 3 times or more within the prior 7 days. This will show users who clicked email links and viewed content within 7 days before subscribing.
Keep In Mind
Note that the For clause events could have occurred outside of the main date range in the query builder.
For example, Subscribe events in the chart window could have occurred within the Last 7 Days of the current date, as set in the date range menu at the base of the query builder. However, the Email Clicked and Blog View events will have occurred within the 7 days prior to the Subscribe event.
If a Subscribe event occurred 6 days ago, and Email Clicked occurred 6 days prior to that, the Subscribe event will be counted even though Email Clicked occurred 12 days prior to today.