Know what your product is doing. Right now.
Official Ruby client for telesink.com - real-time event tracking.
- Ruby 3.0+
Add to your Gemfile:
gem "telesink"Then run:
bundle installSet the environment variable:
export TELESINK_ENDPOINT=https://app.telesink.com/api/v1/sinks/your_sink_token_here/eventsTo disable tracking (e.g. in test/dev):
export TELESINK_DISABLED=trueTelesink.track(
event: "user.signed.up",
text: "user@example.com",
emoji: "👤",
properties: {
user_id: 123,
email_address: "user@example.com",
},
occurred_at: Time.now, # optional, defaults to now
idempotency_key: "my-key", # optional, defaults to random UUID
)true— event sent successfullyfalse— disabled, missing endpoint, or network error
Errors are never raised. They are logged to STDERR and fail silently.
bundle exec rake testMIT (see LICENSE.md).