Operational

DocsGithub Open app

Operational

Github Articles Pitch Usecases Playground API

Contents

Start hereSetup Operational
The Manual
IntroductionPWA & push notificationsConventionsSetupTest modeNotifications
Integrations
Nodejs SDKPHP SDKWordpress plugin
Events API
IntroductionSend your first eventEvent parametersStructured EventsActionsContextsCategoriesError handling
Self hosting
IntroductionInstall locallyInstall on VPSInstall on RenderInstall via DockerInstall via Docker and CoolifyOnboardingSetup .envSetup PWA & push notificationsBest practices
Other
VisionRoadmapContributing

Sending your first event

Run this code in your node.js backend.

import Operational from "@operational.co/sdk";
// Or use this if imports are not supported in your node.js version
// const Operational = require("@operational.co/sdk");

const ops = new Operational("yourapikey");

const e = {
  name: "Operational!",
}

await ops.events.ingest(e);
const bearerToken = 'Bearer apikey';
const baseUrl = 'https://api.operational.co';
const url = `api/${this.version}/log`;
const event = {
  name: "test event"
};

fetch(`${baseUrl}/${url}`, {
  method: 'POST',
  headers: {
    'Authorization': bearerToken,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(event)
})
.then(response => {
  if (!response.ok) {
    throw new Error('Network response was not ok');
  }
  return response.json();
})
.then(data => {
  console.log('Success:', data);
})
.catch(error => {
  console.error('Error:', error);
});

This will show an event inside ops.

~
12:00 amOperational!
IntroductionEvent parameters

Operational

Event tracker for your product.

PrivacyTerms
About the product
  • Use cases
  • Playground
  • API
  • Pitch
  • Wordpress plugin
  • Bubble plugin
Related to the product
  • VS Logsnag
  • Open Source
  • Articles
Useful articles for your business
  • Force post: The Payment Hack that lets Merchants charge you without approval
  • 6 Best practices for early stage B2B SaaS customer support
  • Setup event notifications for your SaaS
  • How to get high quality users for your B2B SaaS business?