| Crates.io | posthog-rs |
| lib.rs | posthog-rs |
| version | 0.3.7 |
| created_at | 2021-04-28 19:22:23.141643+00 |
| updated_at | 2025-06-03 07:30:04.110802+00 |
| description | The official Rust client for Posthog (https://posthog.com/). |
| homepage | |
| repository | https://github.com/posthog/posthog-rs |
| max_upload_size | |
| id | 390726 |
| size | 25,348 |
Please see the main PostHog docs.
This crate is under development
Add posthog-rs to your Cargo.toml.
[dependencies]
posthog-rs = "0.3.7"
let client = posthog_rs::client(env!("POSTHOG_API_KEY"));
let mut event = posthog_rs::Event::new("test", "1234");
event.insert_prop("key1", "value1").unwrap();
event.insert_prop("key2", vec!["a", "b"]).unwrap();
client.capture(event).unwrap();