Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1022 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 1022 Bytes

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