Return to site

Defining Custom Voice Events and Variables on Opearlo Analytics

3 minute read

Opearlo Analytics is a voice specific analytics platform, which lets you track key usage metrics of your voice apps, from the number of new vs. returning users, to daily or monthly active users.

It also provides valuable insights into the types of conversations users are engaging in with your voice app, which we refer to as “voice pathways.”

But one of the most useful features is the ability to define Custom Voice Events and Variables.

What is a Custom Voice Event?

This could be any user-generated event that is not pre-defined by an Alexa Intent – such as a request for a piece of content or functionality, or a programmatic event – such as an API Error.

What is a Custom Voice Event Variable?

These are pieces of variable data. For example, if “Find Restaurant” is a Voice Event, “Restaurant Cuisine” would be an example of a Voice Event Variable Name and its possible Variable Values would be “Thai”, “Italian”, “French” etc.

Whereas for an API Error, the Voice Event Variable Name could be the API Called, and the Variable Values could be the error message.

How do I define Custom Voice Events and Variables in my code?

The below piece of code shows how to do this, which can also be found in the set up instructions of Opearlo Analytics.

What’s an example of a user generated custom voice event?

Let’s say we’re building a recipe skill for a client, where users can make requests such as “Alexa, ask recipe skill for an easy pasta dish” or “Alexa, ask recipe skill for a gluten free starter recipe.” For the most part, our client’s database can return a suitable recipe, but there will be cases when a user searches for a recipe that doesn’t exist – in this example we will refer to this as a “No Recipe Match” scenario.

This is an important scenario for the client, because they want to understand what recipes users are requesting that their skill doesn’t currently support.

However, “No Recipe Match” isn’t an intent in our code, so to draw this out in Opearlo Analytics, we need to define a custom voice event.

In the example code below, “No Recipe Match” is the Custom Voice Event. So for the user request “Alexa, ask Recipe Skill for a rib recipe with eggs,” the words “rib” and “eggs” would be example search queries.

To capture these queries, we’ve also passed a Custom Voice Event Variable, so that we’re able to record what the user said in their recipe request. We do this by joining the search queries together as a string:

In this case, the Custom Voice Event and Custom Voice Event Variable have the same name, but this doesn’t need to be the case.

This data is then reflected in the analytics dashboard in two places. 

The first is in the Voice Pathways tab, where the Custom Voice Events are included in the pathway, along with the other Alexa Intents:

The above voice pathway shows that a user requested to search for a new recipe, didn’t find a match the first time, so then decided to stop the interaction. The number on the left of the pathway represent the number of times this pathway occurred.

The second place the data is reflected is in the Requests tab, where the Custom Voice Event Variables are recorded in tables by their different values and corresponding counts. In this case, the Variable Name is “No Recipe Match,” which is drawn out in the title of the table.

What’s an example of a programmatic custom voice event?

In our Recipe Skill use-case the recipes are held in our client’s database, which we are accessing via an API. Rather than monitoring the API in the back end, we can draw these out in the analytics by defining an API error as a custom event.

In the example code below, “Recipe API Error” is the Custom Voice Event, and the Custom Voice Event Variables are the API error messages. The second part of the code shows how we record the analytics, again more information on this can be found in the set up instructions.

Again, this information is recorded in two places on the dashboard. The first is in the voice pathways tab (in the screenshot below, you can see that 19 search recipes requests generated an API error).

It is also shown in the requests tab, which is particularly useful as you can see what the error message returned was, as well as how many times it occurred.

Hopefully you now have a better understanding of how to install Opearlo Analytics with custom voice events and variables configured.

If you have built an Alexa Skill (it doesn’t need to be certified), you can sign up here to install the analytics.

If you are experiencing installation issues or wish to give us some feedback or suggest feature requests, feel free to get in touch as we love hearing from all our users.

All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OKSubscriptions powered by Strikingly