npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

voxa-ama

v0.2.5

Published

Integrate Amazon Mobile Analytics analytics into your Alexa apps using the voxa framework

Downloads

8

Readme

Voxa AWS Mobile Analytics

Build Status Coverage Status

An AWS Mobile Analytics plugin for voxa

Installation

Just install from npm

npm install --save voxa-ama

Usage


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) => {
  voxaEvent.ama.ignore();
  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