Skip to main content
Interania

Modify Queries in the Explorer

3votes
27updates
448views

Okay, now it's time for a deeper dive. We're going to explore from a chart on the dashboard, modify the query to take a closer look at Wikipedia user behavior, and then save the new query to your own personal dashboard. This is a long section — with lots of pictures — but just take it step-by-step and you'll be done in no time. Remember, if you get lost at any time just go back to the demo landing dashboard and start again with the pinned chart. 

If you learn best by reading, take a minute to also check out our reference on the Query Builder. It provides a concise explanation of what you're seeing in the query builder. 

Explore from the Log Actions by Wiki pie chart

First, find the Log Actions by Wiki pie chart on the landing dashboard. Wikipedia changes include what are called log events. These indicate something that happened without changing the contents or category of an article. Often these log events relate to preserving the integrity of Wikipedia by preventing abuse, managing users, or managing articles in some way. For example, the hit action in orange on the charts shows that an attempted change triggered an abuse detection filter. That often happens without any intended abuse, especially while new users are learning how to contribute to Wikipedia. The example chart on the dashboard shows how these log actions differed between four of the most active Wikis.

Let's say that we want to better understand how logged actions differ between newly registered and more experienced users on the English Wikipedia site. We can use this chart as a jumping off point for our curiosity. Like last time, just click the compass icon on the bottom right of the chart to bring it into the Explorer.

Parts of the Interana Explorer

Before we dive into the query detail, let's take a minute to get familiar with the Explorer interface. Check out this animated image showing various parts of the Explorer, starting with the Navigation Panel:

We'll be referring to these areas of the Explorer throughout this demo. In a bit more detail:

  • Navigation Panel — Quickly change between the major areas of the Interana interface
  • Visualization Window — Area where the selected query results are visualized and explored
  • Query Builder — Point-and-Click interface for constructing powerful behavioral queries
    • Dataset Selector — Select the dataset used for queries
    • View — Select the visualization or reporting style for the query results
    • Time Range — The range of times used to select the events considered for the query
    • Measure — The measure visualized or reported by the query
    • Compare Groups — How the measure should be divided and grouped for comparison
    • Event Filters — Which events should be included in the query
    • Compare Filter Clauses — In Compare mode, which events should be included in each comparison group
  • Query History — A trail of breadcrumbs showing a history of previous queries that can be brought back with a single click

Look at the interface and see if you can identify all the elements mentioned above. With a little practice, the Explorer will enable you to quickly follow your intuition to discover the behavior of the people and devices in your data. 

Drill down on English Wikipedia

Ok, now let's change the dashboard query. We're looking to understand new and older users of English Wikipedia, so we can start by modifying the first Compare Filter clause, titled "Wikipedia." There are currently two filters in that clause. The first — wiki is one of enwiki — filters for just those events that occur on the English Wikipedia site, which is encoded as "enwiki". The second — log_action is not one of *null* — filters out all events that did not have the log_action column populated. The "*null*" value is a value that Interana uses when the column value for the event is missing.

We want to compare new and older users, so we'll need to add something to the filters that looks at users. For the demo, we've already published a cohort (a group of people who share a characteristic) that identifies new users who've registered in the last 28 days. We'll use this cohort to help build our query.

Click the Add Filter button at the bottom of the comparison clause as shown in the image above. This will open a new filter dialog looking to select a column. Start typing user until the user column is selected, then click on the entry:

Next, set the condition to is in cohort:

Finally, click in the value field and select the cohort named "Users Registered Last 28 Days":

Now go back to the top of the clause, click the blue name and rename it from "Wikipedia" to "New Users", pressing Return when done:

The end result is that we've added a new filter that makes this compare clause only apply to users who've registered in the last 28 days and renamed it so it's easy to remember. 

Remaining comparison clauses

Now let's adjust the remaining clauses. First, clone our New Users clause by clicking the +/clone icon:

Name the cloned compare clause "Older Users", and then change the user filter condition to be is not in cohort:

Finally, scroll up until you can see the B, C, and D clauses we no longer need. Click the trash can icon next to those clauses to remove them from the comparison:

At this point, you should be left with only two comparison clauses that filter to events associated with English Wikipedia where the log_action is not null, and compare whether users are in or out of the the cohort for users who registered in the last 28 days.

Try the modified query

Let's try our new query. Go back to the top of the window and click the big green GO button:

The results should look something like this:

Dial in the query to be precise

Notice that most of the actions for new users are dominated by the "create" log_action type, and there are lots of other actions that are smashed together at the top of the chart. That "create" log_action is what indicates new user registration and is the very definition of a new user. So let's filter that out to better compare the other actions. In the New Users clause, click the values field for the log_action is not one of and start typing "create" until the auto-complete lets you select it. When done, it should look like:


Why makes it special

What makes it special: Interana incorporates auto-complete and type-ahead functionality for column names and data values. This makes it much simpler for new users, who can now select logically named columns and values without having to consult a data dictionary. Tool tips for the columns further help with learning.


Another factor to consider is that Wikipedia data contains events associated with registered and anonymous users. We defined the Older User events as those not associated with users who registered in the last 28 days. But that also includes events performed anonymously. Because anonymous and registered users often behave very differently, let's filter out the anonymous events from the Older Users. We can do that by adding a new filter (using the + button) and checking that anonymous is one of 0. It'll look something like:

Now click the big green GO button at the top and check out the results. It'll likely look something like this:

Different, with a bit more detail. However, notice the golden warning triangle? The query was run with sampling enabled by default, but some of the events appear relatively rare. Interana is warning you that sampling may not be appropriate here. No worries, it also tells you how to fix it, using the chart controls:

Click the CHART CONTROLS box in the upper right of the chart area, then uncheck SAMPLED QUERY and click the green APPLY button. This will repeat the query on the full set of raw events without sampling. The resulting chart should look something like this:

Interesting! We can now see that in terms of log events, there's a big difference between new and older users. New users seem to trigger the abuse filter very frequently, and they rarely perform many of the other maintenance activities associated with older users. The other logged action type that stands out is "thank," where the user thanks another user for their help or contributions. 

Save the query to a personal dashboard

Ok, you've now created your first customized query. Let's save it to a personal dashboard. Click the thumbtack icon in the upper right of the chart:

This will open up a window that lets you save the query to a dashboard and customize some options. Give the query a descriptive name like "Log Actions Comparing New and Older Users (last 28 days)" and click your default personal dashboard under My Dashboards. When done, click the blue "Pin" button to save the query:

 

Now, if you open up the Dashboards panel and look under "My" dashboards, you should see your personal dashboard with a query count of 1:

Click on that dashboard and see how the saved query looks:

Wrapping up

That's it! You have now:

  1. Started with a published query on a shared dashboard.
  2. Brought the query into the Explorer to see how it's constructed.
  3. Modified the query to better understand the behavior of Wikipedia users.
  4. Saved your modified query to your personal dashboard.
  5. Navigated between the Explorer and the dashboards.

This exact flow is used every day by thousands of Interana users to explore the behavior of customers and devices. Living Dashboards serve as a jumping off point for exploration and learning, as well as a repository for insights gained along the way.

Next step

Next up we'll take a closer look at cohorts, a simple way to group actors that all behave in some similar way. You've already used a published cohort to identify recently registered users. Let's see how it was defined and go from there.

 


important_icon.png Please keep in mind that you're using a shared demo system meant for learning by everybody. The dashboards and objects you create will stick around for a while, but we will periodically clean up the system and remove stale accounts.


  • Was this article helpful?