| Crates.io | telemetrydeck-wasm |
| lib.rs | telemetrydeck-wasm |
| version | 0.2.0 |
| created_at | 2022-02-16 06:33:42.084689+00 |
| updated_at | 2022-02-16 16:37:05.464782+00 |
| description | (unofficial) TelemetryDeck client for fast and reliable libraries and apps using Rust and WebAssembly |
| homepage | https://telemetrydeck.com |
| repository | https://github.com/kkostov/telemetrydeck-wasm |
| max_upload_size | |
| id | 533117 |
| size | 12,883 |
Client for integrating private analytics in fast and reliable libraries and apps using Rust and WebAssembly
The library provides a wrapper around the TelemetryDeck endpoint for broadcasting signals.
let client = TelemetryDeck::new("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
// Signal a type and a user identifier
client.send("addOne", Some("user"), None, None);
// Signal with custom payload parameters
client.send(
"signalType",
Some("user identifier"),
Some(HashMap::from([("key".to_string(), "value".to_string())])),
None,
);
When an instance of TelemetryDeck is created, it is assigned a session identifier. This identifier persists for all outgoing signals during the lifetime of the instance.
You can reset the session identifier without recreating the client:
client.reset_session(None)
You can also provide your own session identifier:
client.reset_session(Some("my session id".to_string()));
Check the example folder for a working app using Yew.
This repository is not affiliated with TelemetryDeck.