Skip to content

Unity support #47

@haacked

Description

@haacked

Copied from: PostHog/posthog#25705.

Feature request

Is your feature request related to a problem?

Currently, PostHog lacks native support for Unity game development, making it challenging for game developers to integrate PostHog's powerful analytics capabilities directly into their Unity projects. This gap limits the ability of game developers to easily track player behavior, analyze game performance, and make data-driven decisions to improve their games.

Describe the solution you'd like

I am proposing adding native Unity support to PostHog through the following steps:

  • Develop a PostHog Unity SDK that seamlessly integrates with Unity projects.
  • Create Unity-specific event tracking methods for common game events (e.g., level completion, in-app purchases, player deaths).
  • Implement automatic collection of Unity-specific metadata (e.g., game version, device information, graphics settings).
  • Provide Unity-friendly documentation and examples for easy integration.
  • Add Unity-specific visualizations and dashboards in the PostHog UI for game analytics.

Describe alternatives you've considered

  • Using RudderStack as a middleman to send Unity data to PostHog [https://www.rudderstack.com/integration/posthog-analytics/integrate-your-unity-app-with-posthog-analytics/]. While this works, it adds complexity and an extra dependency.
  • Implementing a custom solution using PostHog's API [https://posthog.com/docs/api].
  • This requires more development effort from game developers and may lack Unity-specific optimizations.

Additional context

Unity is a widely used game development platform, and native support would open up PostHog to a large market of game developers.
This integration could include:

  • Automatic tracking of common Unity events (e.g., scene loads, object instantiation).
  • Unity Editor plugin for easy PostHog configuration.
  • Performance optimizations to minimize impact on game frame rates.
  • Support for offline event caching and batch sending to handle intermittent internet connections common in mobile games.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions