Skip to main content
Interania

Using a 2.x per-actor metric as a 3.x actor property

0votes
12updates
32views

Per-actor metrics in 2.x are very similar to Actor properties in 3.x. However, actor properties currently do not support the "activity" aggregation option.

Goal

This article shows you how to create a per-actor metric in Interana 2.x, and then an actor property in Interana 3.x. We will be using the movies database in both examples.

Create and use a 2.x per-actor metric 

Per-actor metrics calculate how many times an event occurs during a specified period of time, such as the number of users active out of a 7 day period. Interana displays per-actor metrics as  metric  <metric name> in lists. You can create queries to measure metrics that analyze the characteristics of different actors, or filter to compare subsets of actors based on ad-hoc criteria.

In the following example, we create a per-actor metric for Movies watched for each user in dataset movies.

To create a 2.x per-actor metric, do the following:
  1. In Explorer, select the Metrics icon in the left navigation bar.

WB_2.x_per-actor-metric-icon.png

  1. Click New Metric in the upper right corner of the window. The New Metric dialog appears.

WB_2.x_New-Metric.png

  1. Enter a Name and select a Dataset from the drop-down menu. In our example, we named the metric Movies watched and selected the movies dataset.
  2. Select a For each option and Measure from the drop-down menus. In our example, we selected (For each) user and Count Events as the measure.
  3. For Filter, click Basic and specify filter options in each of the fields. In our example, we selected action as the first filter option, followed by is one of and watch_movie.
  4. Enter a Description for the metric, and click Save. A table list of metrics appears.

WB_Per-actor-metric_dialog.png

  1. Click the Explore icon to the right of the metric you just created. The Explorer window appears using the metric in the query builder on the left.
  2. Specify a Start and End time, and then click GO. You can select from the calendar, or enter a value. We entered a Start time of 200 days ago, and an End time of now.

WB_2.x_Per-actor-metric_Time.png

Queries are run as Sampled by default. 

  1. To view unsampled results, under Chart Controls, deselect the Sampled Query radio button so the check mark disappears, then click Apply.

WB_Per-actor-metric_unsampled.png

We received the following unsampled results for our example query.

WB_Per-actor-metric-unsampled_Results.png

To use the 2.x per-actor metric in a query, do the following:
  1. Click inside the View field and select Time from the drop-down menu. The results will be displayed over time.

WB_Per-actor-metric_TimeView.png

  1. Keep the Start time of 200 days ago, and End time now.
  2. Select a Measure from the drop-down list. We selected Sum for our example.
  3. Enter or select the name of a metric in the field below. We entered the Movies watched.
  4. For Groups, select user from the drop-down list. This will show a time line for each user.
  5. Select Chart Controls and make sure the Sampled Query radio button is not checked.
  6. Click GO. and uncheck All others in the legend beneath Time view. We received the following results for our example.

WB_Per-actor-metric_Using-results.png

Create and use a 3.x actor property

An actor is the "who or what" that is performing an event. An actor can be a user, physical object (such as a device), digital object (like a subreddit), or a bot.

Actor columns are identified at ingest time by explicitly making them shard keys. When an event source has multiple actor populations, they are implemented through multiple shard keys on the same dataset (table). An actor is one of the “mandatory” fields for every logged event, which also includes a timestamp and name of the event. 

This section demonstrates how to create an actor property. In our example, we create an actor property that determines the movies watched by each user over a specified time.

To create a 3.x actor property, do the following:
  1. In the left navigation bar, click Actors.

icon_actors.png

  1. Click New Actor Property in the upper right corner of the window.

1.4_NewActorProperty-button.png

  1. Choose a dataset from the drop-down list at the top of the window. In this example, we chose the movies dataset.

WB_3.x_Actor-Prop_dataset-select.png

  1. At the top of the page, enter a unique name for the actor property. We named our property Movies watched in the last 200 days.

WB_3.x_Actor-Prop_Name.png

  1. Select an actor from the drop-down list. In this example, we selected user. Your options reflect your data

1.4_ActorProperty_actor-option.png

  1. Click the Show tab and choose the appropriate options from the drop-down lists. In our example data, we chose count of events.
  2. Make selections for Filtered to options. We chose events with action that matches watch_movie.

1.4_Show-count-events.png

  1. Click the Time range radio button (for more information, see specify relative time in a query) and specify Starting time and Ending time values. We entered a Starting time of 200 days ago and an Ending time of now for our example. 

WB_3.x_Actor-Prop_Time-range.png

  1. Click Save.
To use the 3.x actor property in a query, do the following:
  1. Select the Explore icon in the left navigation bar, and select the database from the drop-down list. We selected the movies database.
  2. Select Show count of events in the first line of the query builder.
  3. For Filtered to, we selected the actor property Movies watched in the last 200 days. The sentence model query builder automatically fills in text and provides a greater than option. We accepted the default of is greater than 0.

WB_3.x_Actor-Prop-Using-measure.png

  1. Choose to Split by user actor. This will show movies watched results by user.
  2. Specify a Starting and Ending time. We entered a Starting time of 200 days ago and an Ending time of now.

WB_Actor-Prop_Split-by_Starting-Ending.png

  1. Toggle to ALL for an unsampled query, then click GO.

WB_Actor-Prop_ALL_GO.png

  1. In the legend on the right, select All others and toggle to Hide Line. This normalizes the results by hiding an outlier.

WB_Actor-Prop_Hide-All-Others.png

We received the following results for our example.

WB_Actor-Prop_Results.png

 

  • Was this article helpful?