Release: User Intent Analysis

Ivar Pruijn

In this release we add new functionality to modeling library Bach and the open model hub that enable User Intent analysis on your raw analytics data. It comes with an example notebook to get started with your own analysis.

How does it work?

In this example notebook we show how it works in detail, but below we'll give you a glimpse, using data from our own website and documentation pages.

1) Understand where users are spending their time

One of the key aspects of Objectiv is the Location Stack, which captures the exact location where an Event was triggered. The root_location in the Stack uniquely represents the top-level UI location the user was in at the time, e.g. on your product page.

We'll use the session_duration model from the open model hub to see how much time users are spending on average in the main areas of the product, as represented by the root_location:

duration_root = modelhub.aggregate.session_duration(df, 
groupby=['application', 'root_location']).sort_index().head()
application       root_location
objectiv-docs docs 0 days 00:06:32.101332
home 0 days 00:06:26.184331
modeling 0 days 00:07:49.564281
taxonomy 0 days 00:07:45.415114
tracking 0 days 00:05:47.753501
objectiv-website about 0 days 00:02:48.240937
blog 0 days 00:03:54.849918
home 0 days 00:05:32.901595
jobs 0 days 00:02:20.555217
join-slack 0 days 00:02:28.560690
Name: session_duration, dtype: timedelta64[ns]

Of course you can group by any set of features or locations, but your main product areas are a good start.

Next, we want to look at the distribution of time spent overall, to help define the different stages of intent. We again use the session_duration model from the open model hub, and then the Bach quantile operation to get the distribution.

# how is this time spent distributed?
session_duration = modelhub.aggregate.session_duration(df, groupby='session_id')

# materialization is needed because the expression of the created series
# contains aggregated data, and it is not allowed to aggregate that.
session_duration = session_duration.to_frame().materialize().session_duration
# show quantiles
0.1 0 days 00:00:00.602000
0.2 0 days 00:00:01.195600
0.3 0 days 00:00:02.728600
0.4 0 days 00:00:12.125200
0.5 0 days 00:00:42.592000
0.6 0 days 00:02:04.544800
0.7 0 days 00:03:17.138000
0.8 0 days 00:05:35.084600
0.9 0 days 00:19:38.346400
Name: session_duration, dtype: timedelta64[ns]

This shows us that the top 10% of users spend more than 19 minutes in the product, and the bottom 60% less than two minutes.

2) Defining simple stages of User Intent based on product usage & time spent

After exploring the time spent both per major product area and in overall quantiles, we can make a basic definition of different stages of User Intent. In our example we could define them as follows:

User IntentRoot locationsDuration
1 - InformAll sections other than the ones belowAny time spent
1 - InformDocs: modeling, taxonomy, tracking, homeLess than 2 minutes
2 - ExploreDocs: modeling, taxonomy, tracking, homeBetween 2 and 19 minutes
3 - ImplementDocs: modeling, taxonomy, tracking, homeMore than 19 minutes

Of course you can adjust the definitions based on your own collected data.

3) Finally: assigning Intent to each user

Based on the simple definitions above, we can now assign a stage of Intent to each user, based on what they use and how much time they spent in it. For details on how that works, have a look at the example notebook. See the results below:

Results for User Intent analysis on our website and documentation pages

Results for User Intent analysis on our website and documentation pages

That's it! You've used the open model hub and Bach to understand where users are spending their time and how it is distributed, and to assign intent to each user. You now know for each user what stage of their journey they're in. All directly on your raw analytics data.

How to get it

The models and operations you need are live in the open model hub and for Bach. For running your own analysis, please have a look at the example notebook.

Don't forget to upgrade the open model hub package if you already have it installed:

pip install --upgrade objectiv-modelhub

Enjoy modeling User Intent!

Try Objectiv

Spin up the Demo - Try Objectiv on your local machine (takes 5 minutes)
Objectiv on GitHub - Check out the project and star us for future reference
Objectiv on Slack - Join the discussion or get help