Set it up
- In PostHog, copy the project token from Project settings (it starts with phc_).
- In Aplyna, open Integrations → PostHog. Choose EU Cloud or US Cloud and enter the token.
- Optionally add the token of a different PostHog project for sandbox events.
- Save, then choose Send test event and look for aplyna_integration_test in PostHog.
- Event names start with aplyna_ and can be changed. An empty name turns an event off.
- Leave SDK journey forwarding off when your app already sends those events to PostHog itself.
- Sandbox events never go to the production project.
Match the PostHog person
To attach subscription events to the person your app tracks in PostHog, report the same distinct ID from your app. Read it from the PostHog SDK and add it to your Aplyna events as posthog_distinct_id.
React Native
await Aplyna.track("app_opened", {
properties: { posthog_distinct_id: posthog.getDistinctId() },
});
await Aplyna.flush();- Without it, events are sent under the customer's App User ID.
- When your app reports the ID later, Aplyna sends one alias so the earlier events join the same person. PostHog merges cannot be undone.
- People are never linked from timing or amounts.
Events and revenue
- Apple: purchases, trials, conversions, renewals, cancellations, expirations, billing issues and product changes.
- Google Play: collected orders and observed changes such as cancellation, pause, expiration and billing issue.
- revenue is the gross store amount in its original currency, with a currency property. It is not a payout.
- History is not replayed when you connect.
Delivery
Events are retried up to five times. Failed events stay visible in Delivery history, where an Admin can retry them. Changing the destination cancels events still waiting for the old one.