@real2u/analytics

1.1.0 • Public • Published

Analytics

Real-time data processing analytics

Based on https://aws.amazon.com/getting-started/projects/build-serverless-real-time-data-processing-app-lambda-kinesis-s3-dynamodb-cognito-athena/4/

Example

// initalize
const analytics = new Analytics({
  cognito: {
    identityPoolId: 'us-east-1:abcdefab-abcd-abcd-abcd-abcdefabcdef'
  },
  kinesis: {
    streamName: 'AnalyticsStream'
  }
})
// set dimension values
analytics.set('sku', 'RE000001')
// predefined metric
analytics.send({
  [analytics.dimensions.add_to_cart]: 1
})
// custom metric
analytics.send({
  'element': 'color_button',
  'click': 1
})

Readme

Keywords

none

Package Sidebar

Install

npm i @real2u/analytics

Weekly Downloads

6

Version

1.1.0

License

none

Unpacked Size

8.53 kB

Total Files

5

Last publish

Collaborators

  • aviggiano