Receive push notifications for suspicious activity inside your app with JavaScript

Learn how to send real-time push alerts for suspicious events in your app using Operational and JavaScript for improved security.

What is push notification for suspicious activity

Push notifications for suspicious activity help you stay ahead of security threats.

When your app detects unusual behavior, like repeated failed logins or data export spikes, you get an instant alert.

This lets your team respond quickly and protect user data. For example, if five login attempts fail within a minute, you can trigger an alert right away.

What is Operational and how it works for alerts

Operational is a lightweight event tracking tool that lets you record and monitor security events.

You can send any event from your app and see it in a dashboard or get push notifications.

Operational in action

Operational shows events in real time and helps you filter or search for specific activity.

Setting up Operational

  1. Go to https://app.operational.co and sign up for an account.
  2. Create a new project in your dashboard.
  3. Copy your API key from the project settings.
  4. Install the SDK in your project with npm install @operational.co/sdk.
  5. Ready to start tracking events in your code.

Code examples for tracking suspicious activity

import Operational from "@operational.co/sdk";

const ops = new Operational("YOUR_API_KEY");

const suspiciousEvent = {
  name: "Suspicious activity detected",
  avatar: "🚨",
  content: "Multiple failed login attempts from IP 203.0.113.45"
};

await ops.events.ingest(suspiciousEvent);

This example sends an alert when several failed logins occur in a short time.

await ops.events.ingest({
  name: "Unusual data export",
  avatar: "📤",
  content: "User Jane Doe exported 500 records"
});

This sends a notification when a large data export happens.

await ops.events.ingest({
  name: "New device login",
  avatar: "🔑",
  content: "User John Smith logged in from new device"
});

This tracks logins from unfamiliar devices.

await ops.events.ingest({
  name: "Admin page access",
  avatar: "🔒",
  content: "User admin@example.com accessed admin settings"
});

This alerts when someone opens the admin settings page.

Conclusion

Operational saves you time by handling event delivery and dashboarding so you can focus on responding to threats.

Learn more at https://operational.co and try live examples in the playground: https://operational.co/playground

Start sending alerts in minutes and keep your app secure.