windsor-node
Send data for Windsor.io from Node

Get started
- Create a Windsor Account
- Setup the Node source
- Create Users on Windsor
- With
windsor-node
, callwindsor.user(...)
everytime a new user signs up or data about a user changes to keep things updated
- With
- Track Events
- You'll want to see every important event or issue your user runs into. Call
windsor.event(...)
for every event you want to know a user has taken. You can setup alerts and more from Windsor
- You'll want to see every important event or issue your user runs into. Call
Read the docs here.
Why?
You care about your users. You probably already have a slack channel filling up with important events, or you search through logs to see what your users are upto. Windsor is a better way. Track the users and events you care about to Windsor so your company can more easily manage and understand your user behavior.
For example, you can create a new Windsor user from any Node app:
windsor;
And track events you'd like to know your users took
windsorevent userId: "01nc83ns" event: "Post Created" properties: title: "Getting Started" private: false ;
Then follow the user on Windsor

Installation
$ yarn add windsor-node
Usage
const Windsor = ; const windsor = "token"; windsor; windsorevent event: "event name" userId: "user id";
Advanced Usage
windsor-node
batches and sends multiple events together to improve performance on production systems. When using windsor-node
on a serverless/lambda environment like AWS Lambda, Vercel or Serverless, you need to ensure that all events are sent before responding to the request.
const Windsor = ;const windsor = "token"; exportshandler = async { let greeting = ""; if eventqueryStringParameters && eventqueryStringParametersgreeting console; greeting = eventqueryStringParametersgreeting; // A promise is returned, but instead of using await here // we can send multiple analytics events and then await a single // call to windsor.flush() before returning the response windsorevent event: "Sent Greeting" properties: greeting ; const message = ` World.`; const responseBody = message ; const response = statusCode: 200 body: JSON ; await windsor; return response;};
Documentation
Documentation is available at https://docs.windsor.io/docs/analytics
License
Copyright © 2020 Windsor Software Inc. <team@windsor.io>
See the LICENSE file for details and see the SEGMENT_LICENSE file attribution to the Segment Library this was based off.