Send Logging Events to Keen
Keen provides a service to capture and analyze events generated in your apps. In their words:
Analytics transforms data into answers – the kind of answers every company deserves. Unfortunately, a lot of companies a) can't find an analytics service that's right for their specific needs, and b) don't have the resources to develop their own analytics infrastructure. That's why we started Keen IO. Basically, we built it, so you don't have to. And we made it powerful, flexible, and scalable enough that you can use it however you need to – even if those needs change over time.
In this example, you will learn how to connect Auth0 to Keen and stream
signup events. To implement this with Auth0, you just need to create one Rule in your pipeline.
How it works
Record a sign-up event in Keen
Create a rule that will record user
signup events for your apps in Keen. Please note:
In this example, we expect your Keen credentials to be stored in the global
configurationobject. Be sure to add your Write Key here before running your rule. Doing this allows you to use your key in multiple rules and prevents you from having to store it directly in the code.
For this rule, we send contextual information, such as IP address (can be used to deduce location), user ID, and username. However, you can send any number of properties.
For this rule, we track the event type using a persistent property called
user.signedUp. When the property is set to
true, we return immediately. Otherwise, we assume the event is a new
signup, and if everything goes well, we set the property to
true. The next time the user signs in, this rule will be skipped.
Check out our repository of Auth0 Rules for more great examples: