PostHog is an open-source product analytics platform. With the PostHog integration, you can track custom events and user behavior in your Glide app.
Don't see the PostHog integration?
You may need to upgrade your plan. Browse Glide's plans and find the right fit for you.
Adding and Configuring the Action
To use the PostHog integration, you'll first need to set up a PostHog account. Once you have a project API key, you can connect the project in Glide.
In Glide, click the Settings menu.
Find the Integrations section and select PostHog.
Click Add.
You will need your PostHog project's Project API Key to track events. You can find it in your PostHog settings.
The API Host will default to https://us.i.posthog.com, but depending on your PostHog region, you may need to change this. Your correct API Host can be found in your settings tab.
Under Person Profiles, choose either:
Identified Only: Creates profiles only for users who have been explicitly identified in PostHog
Always: Creates profiles for all visitors, including anonymous ones
Track Event
The Track Event action allows you to send custom events to PostHog when users interact with your app.
The action can be added to a Component that supports Actions (e.g., a Button component), added to a workflow in the Workflow Editor, or after a Form is submitted.
Analytics Events Only Work in Live Apps
Tracking custom events only works in live apps when triggered by a user. Note that when testing in the Glide builder, the action will not track data.
Select the component you'd like to add the action to.
In the General tab on the right side of the Layout Editor, navigate to the Actions section and search for Track Event or navigate to Integrations → PostHog → Track Event.
Note that there are other integrations that have a Track Event feature. Make sure to pick the correct one.
Name the action.
Choose an icon.
Enter an Event Name that describes the action being tracked.
Add values to track.
Click away to exit the configuration.
In the Workflow Editor
Select the plus (+) sign or the + New Workflow button.
Choose a trigger.
In the General tab on the right side of the Layout Editor, navigate to the Actions section and search for Track Event or navigate to Integrations → PostHog → Track Event.
Note that there are other integrations that have a Track Event feature. Make sure to pick the correct one.
Enter an Event Name that describes the action being tracked.
Add the values you want to send to PostHog.
Name your Workflow.
Click away to exit the configuration.
To learn more generally about Integrations in Glide, including how they affect your app’s usage, check out our Introduction to Integrations.