https://github.com/coelhucas/godot-posthog
📊 Godot 4.X integration for PostHog API
https://github.com/coelhucas/godot-posthog
analytics godot godot-engine posthog
Last synced: 12 months ago
JSON representation
📊 Godot 4.X integration for PostHog API
- Host: GitHub
- URL: https://github.com/coelhucas/godot-posthog
- Owner: coelhucas
- License: mit
- Created: 2024-02-08T17:35:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T19:02:43.000Z (over 2 years ago)
- Last Synced: 2025-06-25T19:02:45.166Z (12 months ago)
- Topics: analytics, godot, godot-engine, posthog
- Language: GDScript
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Godot PostHog
Integration of PostHog API for Godot 4.X
Made on top of [@WolfgangSenff](https://github.com/WolfgangSenff)'s [PostHogPlugin](https://github.com/WolfgangSenff/KylesGodotPlugins/blob/master/PostHogPlugin/)
## Usage
Put `posthog/` folder inside `res://addons/`
Once the plugin is added, your project will get a new global setting, `Posthog API Key`

Set it to your API Key and then you'll be able to send your events as follows:
```gdscript
var _ev := PostHogEvent.new()
_ev.event_name = "Your event name"
_ev.distinct_id = "an unique identifier"
_ev.properties = { "some_key": "a value", "another_key": "value" }
PostHog.send_event(_ev)
```
A `timestamp` is optional, will be set to the server one if none is sent.
An example of a custom event send to their analytics dashboard:
