Skip to content

coelhucas/godot-posthog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Godot PostHog

Integration of PostHog API for Godot 4.X Made on top of @WolfgangSenff's PostHogPlugin

Usage

Put posthog/ folder inside res://addons/

Once the plugin is added, your project will get a new global setting, Posthog API Key image

Set it to your API Key and then you'll be able to send your events as follows:

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:

image

About

πŸ“Š Godot 4.X integration for PostHog API

Topics

Resources

License

Stars

Watchers

Forks