Skip to content

edgee-cloud/posthog-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostHog component for Edgee

Coverage Status GitHub issues Edgee Component Registry

This component enables seamless integration between Edgee and PostHog, allowing you to collect and forward analytics events to your posthog instance.

Quick Start

  1. Download the latest component version from our releases page
  2. Place the posthog.wasm file in your server (e.g., /var/edgee/components)
  3. Add the following configuration to your edgee.toml:
[[components.data_collection]]
id = "posthog"
file = "/var/edgee/components/posthog.wasm"
settings.region = "YOUR_POSTHOG_REGION"
settings.api_key = "YOUR_API_KEY"

Event Handling

Event Mapping

The component maps Edgee events to PostHog Event as follows:

Edgee Event PostHog Event Description
Page $pageview pageview event with url as property
Track Your event name A event with your custom event name
User $identify Sets all the data for the user

Configuration Options

Basic Configuration

[[components.data_collection]]
id = "posthog"
file = "/var/edgee/components/posthog.wasm"
settings.region = "YOUR_POSTHOG_REGION"
settings.api_key = "YOUR_API_KEY"

Event Controls

Control which events are forwarded to posthog:

settings.edgee_page_event_enabled = true   # Enable/disable page view tracking
settings.edgee_track_event_enabled = true  # Enable/disable custom event tracking
settings.edgee_user_event_enabled = true   # Enable/disable user identification

Development

Building from Source

Prerequisites:

  • Rust
  • wit-deps: cargo install wit-deps

Build command:

edgee component build

Test command:

make test

Test coverage command:

make test.coverage[.html]

Contributing

Interested in contributing? Read our contribution guidelines

Security

Report security vulnerabilities to security@edgee.cloud

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •