#api #posthog #external #enhancement #interact #analytics #hedgehog

hedgehog-rs

A simple Rust library for interacting with the Posthog API

6 releases

0.1.5 May 5, 2024
0.1.4 May 5, 2024

#556 in Web programming

Download history 241/week @ 2024-04-29 124/week @ 2024-05-06

365 downloads per month

Custom license

33KB
809 lines

Hedgehog

Hedgehog is a Rust library designed to make it easy to interact with the Posthog API, a powerful open-source product analytics platform.

Notice

This repository contains software that was originally developed for internal use by our organization. We have chosen to open-source this software in the hopes that it may be of use to others.

Please note the following important points:

  • While we are making this software available to the public, we will not be providing external support. If you choose to use this software, please understand that you do so entirely at your own risk.
  • Additionally, we will not be accepting any contributions to this project. The source code is available for you to use and modify as you wish, within the bounds of the included license, but we will not be incorporating any changes or enhancements made by external parties.

Why Hedgehog?

There already exists a few Rust libraries for interacting with the Posthog API, but we found them all to be lacking in some way:

  • We wanted a library that was easy to use, and that provided a simple interface for interacting with the API.
  • The official library is a very basic SDK that only has support for capturing events, and is not actively maintained.
  • Other libraries we found were either incomplete, or lacked an async interface.

Supported Posthog Features

  • Identify users
  • Capture events
  • Capture events in batch
  • Record page views
  • Record screen views
  • Evaluate feature flags
  • Include feature flag information when capturing events
  • Feature flag called event
  • Override GeoIP information when capturing events based on IP address
  • Early access features retrieval
  • Early access feature enrollment

Dependencies

~7–22MB
~297K SLoC