Sufyaan Studio Engineering4 min read

How to Send Server-Side Analytics Events via REST API

Send custom conversion events directly from Node.js, Python, Go, or PHP backend servers to our edge ingest endpoint.

Direct Tutorial Summary
By Sufyaan Studio EngineeringVerified August 2026

Send server-side events by issuing a POST request to https://analytics.sufyaanstudio.com/c with a JSON payload containing w (website UUID), n (event name), u (path), and optional p (JSON properties).

KEY TAKEAWAYS
  • Step 1: Node.js / Express Implementation
  • Step 2: Python / Django / FastAPI Implementation

Step 1: Node.js / Express Implementation

Send a fetch request from your backend server or webhook receiver.

CODE STEP 1
async function trackBackendEvent(websiteId, eventName, path, properties = {}) { await fetch('https://analytics.sufyaanstudio.com/c', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ w: websiteId, n: eventName, u: path, p: properties }) }); } // Example: await trackBackendEvent('YOUR_WEBSITE_ID', 'stripe_subscription_created', '/checkout', { plan: 'enterprise', amount: 499 });

Step 2: Python / Django / FastAPI Implementation

Use the requests or httpx library in Python.

CODE STEP 2
import requests def track_event(website_id: str, event_name: str, path: str, properties: dict = None): payload = { "w": website_id, "n": event_name, "u": path, "p": properties or {} } requests.post("https://analytics.sufyaanstudio.com/c", json=payload, timeout=2) # Example: track_event("YOUR_WEBSITE_ID", "api_key_generated", "/settings/api", {"scope": "read_write"})
FAQ & VERIFICATION

Guide FAQ

Start tracking your websites with confidence.

Create an account in 30 seconds. Up to 25,000 events free every month.

analytics