1.1.10 • Published 2 months ago

embed-analytics v1.1.10

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Embed-Analytics

Embed-Analytics streamlines event injestion and data procesing through a seamless integration into systems. This library enables effortless creation and transmission of event data, ensuring smooth handling for real-time processing. With asynchronous capabilities, it empowers users to efficiently inject and process data streams, leveraging Generative AI for insightful analytics and visualization generation

Installation

You can install Embed-Analytics using npm:

npm install embed-analytics

Usage

Initial Setup

  1. API Key: Ensure you have an API_KEY provided to you. This key is essential for authentication and routing your events.

  2. Configuration File:

    • Create a configuration file to store your API_KEY.
    • The file should be in the following format:
      API_KEY=uMMxxxxxxxxxxxxxxxxxxbW6b
    • By default, the library looks for a file named ea.env in the same directory as the library import. However, you can use any file name and location, just make sure to specify the path when initializing.

Integration

  1. Importing the Library:

    • In your project, import embed-analytics:
      const embedAnalytics = require('embed-analytics');
  2. Initializing the Library:

    • Initialize embed-analytics with your configuration file (assuming the default ea.env file location):
      embedAnalytics.init();

Event Handling

  1. Creating an Event Object:

    • Define an object to describe the event you want to record:
      const eventObj = {
          'device-id': 'camera-OC-12',
          'location': 'Station #3'
      };
  2. Pushing an Event:

    • Use the pushEvent API to send your event:

      pushMyEvent(eventObj);
      
      async function pushMyEvent(eventObj) {
          const push = await embedAnalytics.pushEvent(eventObj);
      }

Contributing

We welcome contributions! If you have any ideas for improvements or new features, please open an issue to discuss it before submitting a pull request.

License

MIT

1.1.10

2 months ago

1.1.9

4 months ago

1.1.8

5 months ago

1.1.7

5 months ago

1.1.6

5 months ago

1.1.5

5 months ago

1.1.4

5 months ago

1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.0

5 months ago