Ravenhub is a complete, real-time notification system that you can add to your web app. This guide will walk you through adding the notification center to your app and sending your first notification.
You can use templates to define what should be sent to your customers or users upon certain events happening in your application. Templates can include data from your application using merge tags as well as emojis.
Buttons
You can optionally add buttons and links to your notifications to make them actionable. Links can be URLs that take your users to a specific page in your app and can also use variables similar to the ones in the message body.
Test data / Preview
Create an Event Type
An Event Type is some action or event in your application that will trigger a notification to be sent.
Add the Notification Center to your application
The Notification Center is the customer or end-user-facing component of Ravenhub. You can add the Notification Center anywhere in your application by including the below code snippets. Your users will be able to see their notifications in the Notification Center as well as control their preferences and connect to Slack to receive notifications there as well.
In addition to that, you can place the Notification Center html tag anywhere that you want to position the Notification Center in your application. There are two attributes to pass in the tag:
Automatically generated when you sign up. You can find it in the Ravenhub app in the top right corner next to the logout button.
subscriberId
The unique ID that you use to identify the user who is logged in. This is how we know who to send notifications to.
You can apply custom styles to any component in the Notification Center. Simply check for class names in your inspector to identify the correct classes to use to apply your customer styles. (Documentation coming.)
You should now see the notification center bell in your app. If you click on it, there won’t be any notifications yet, but we’ll get to that next.
Send your first notification
Now you’re ready to send your first notification. Going back to the Event Type that you created, copy the API Endpoint url. You’ll use this to send a POST request to create a notification. You’ll notice that in the URL there is one variable: “subscriberId” which is the unique ID that you use to identify the user that should receive the notification.
Now that you've sent your first notification, you can use the Event Stream to verify that your event data has been received by Ravenhub, and how the notification will look to your users.
Just go to the Event Stream tab within the Ravenhub admin app and click on an event on the left side. You should see the raw data on the right side as well as a preview of what the notification will look like to your users based on the templates.
The Event Stream has a realtime connection to Ravenhub, so as soon as new events are created you'll see them show up in the Event Stream list.
Dashboard
You can track your notification activity and engagement by going to the Dashboard tab.