Skip to content
LogZuno

Event tracking examples in 12 languages

Tested code to send events from cURL, JavaScript, Node.js, PHP, Python, Ruby, Go, Java, Swift, C, Objective-C and Dart.

LogZuno's ingestion API is plain HTTP and JSON, so any language can send events without an SDK. Each example below is the exact file our snippet tests send to the API before the docs are published.

LanguageNeeds
cURLcurl 7 or later, installed on macOS and most Linux distributions
JavaScriptAny modern browser (fetch and top-level await in a module script), or Deno and Bun
Node.jsNode
PHPPHP 8 with the curl and json extensions (both are in most installations)
PythonPython 3
RubyRuby 2
GoGo 1
JavaJava 11 or later for `java
SwiftSwift 5
CA C compiler and libcurl with its headers (libcurl4-openssl-dev on Debian and Ubuntu; included on macOS)
Objective-CmacOS or iOS with Foundation; clang with ARC
DartThe Dart SDK

For websites, use the script tag instead: it records pageviews and clicks and batches events for you.

C#, PowerShell, R and OCaml examples aren't published yet: we only publish code we have run against the API.