Network Performance Monitor
Miss any of our Open RFC calls?Watch the recordings here! »


0.2.5 • Public • Published

Voxa AWS Mobile Analytics

Build Status Coverage Status

An AWS Mobile Analytics plugin for voxa


Just install from npm

npm install --save voxa-ama


const voxaAma = require('voxa-ama');
const amaConfig = {
  appId: 'appId',
  appTitle: 'appTitle',
  make: 'Amazon',
  platform: 'Alexa',
  cognitoIdentityPoolId: 'cognitoIdentityPoolId',
  suppressSending: false, // A flag to supress sending hits. Useful while developing on the skill
voxaAma(skill, amaConfig);

Suppressing State Events

Sometimes smaller intermediary states can flood the pathways diagram. Suppress a state from logging as follows:

skill.onState('my-state', (voxaEvent) => {
  return { reply: 'Greeting', to: 'my-next-state' };

Logging custom variables

You can also add additional values which will be logged along with the state custom event

skill.onState('my-state', (voxaEvent) => {
  voxaEvent.ama.logEvents('response', 'hello');
  return { reply: 'Greeting', to: 'my-next-state' };

Specific Events

You can also log custom events from a state.

skill.onState('my-state', (voxaEvent) => {
  voxaEvent.ama.logEvents('my-custom-event', { myVariable: 'hello' });
  return { reply: 'Greeting', to: 'my-next-state' };

Creating AWS Mobile Analytics project

AWS Mobile Analytics works hand on hand with Pinpoint and Cognito Pools. The values we need for tracking analytics are:

  • App ID
  • App Name
  • Cognito Identity Pool ID

For creating the property, you should follow the next steps:

  1. Log in with your AWS account, then in the AWS Dashboard, look for mobile analytics step1

  2. In the main menu of AWS Analytics hit the Get Started with Amazon Pinpoint button step2

  3. You will see here your pinpoint apps. Hit the Create a project in Mobile Hub button step3

  4. Enter the name and select the region, the default region is US East (Virginia) step4

  5. Once created, make sure the Analytics checkbox is enabled step5

In this step, some resources will be automatically created: a specific role with S3, Pinpoint and Analytics permissions, a Cognito Pool Identity to manage authentication from users and an Amazon S3 Bucket to export your data.

  1. Now, go to the AWS Mobile Analytics menu and you will see your analytics project ready to receive events from your skill step6

  2. You will see the App Name at the top of the page. Click on it and hit the Manage Apps butotn step7

  3. Here there are all the mobile analytics project including the one you just created. In the second column you will see the App Id for your project step8

  4. After that, look for Cognito step9

  5. Hit the Manage Federated Identities button step10

  6. You will see your cognito pool identities, click on the one created for your project step11

  7. You might need to fix something in the configuration, you need to specify the role for your cognito pool. You can either hit the Click here to fix or Edit identity pool link to go to the configurations. step12

  8. In this screen you can grab the Identity Pool ID and add the role missing. step13

Once you have the App ID, App Name, and Cognito Pool ID you can add them to the voxa plugin configuration and start tracking the events in your skill. Keep in mind the events will last up to 1 hour to show up in the dashboard and it will look like this: step14


npm i voxa-ama

DownloadsWeekly Downloads






Unpacked Size

85.6 kB

Total Files


Last publish


  • avatar
  • avatar