Send data from PostHog to Avo Inspector
Use Avo Inspector as a PostHog destination
If you are already sending your data to PostHog you can stream it to Avo Inspector without adding any code to your codebase.
PostHog has an official plugin maintained by PostHog that sends data directly to Avo Inspector. If you are using PostHog you can set it up within a few minutes.
The Plugin is a side effect of Avo Inspector analyzing your events and keeping your PostHog events stream unchanged.
After connecting the PostHog plugin to a source the event schemas of all events seen in PostHog will automatically be sent to Avo Inspector and you'll be able to monitor the quality of your tracking implementation without any changes in your code!
Inspector only receives your event schema, no actual data will be sent to Avo.
Remember that production data takes up to 2 hours to appear in Inspector dashboard, while development data is available without any delay
Guide to connect PostHog and Avo Inspector
Step 1. Set up your Avo source
An Avo Source is the first thing you need to connect your PostHog data to Avo Inspector.
Open Sources
in the Avo sidebar or Manage Sources
in Inspector tab
If you already have the source, open it in the dashboard. If you don’t have the source corresponding to your app, add a new one.
In the source details, go to "Inspector Setup" and there you’ll see options to integrate Inspector. Pick PostHog to see the integration guide.
Copy the API key, you will need to use it in PostHog for the next step.
Step 2. Enable Avo Inspector plugin in PostHog
-
Open PostHog and log in into your workspace
-
Pick
Plugins
in the sidebar -
Search for
Avo Inspector
in the search box
Enable the plugin and paste the API key
Save it by pressing Save
button under the code editor.
Step 3. Test your PostHog plugin integration on Dev.
You can test the production PostHog Plugin in the same way, but keep in mind that the production data shows with a ~2 hours delay in Inspector dashboard, while development and staging data is shown without delay
Monitor the logs for Avo Inspector plugin in PostHog and verify events are being sent to Avo Inspector.
Then navigate to Avo, pick Inspector
in the sidebar and pick Development environment
You’ll see the event in your dashboard under the source from where you got the snippet from.
This means that the PostHog plugin is working 🎉
Error response from API
The calls to the API are fire and forget, so the API tries to return 200 if it can.
The API will accept multiple events in a batch, and returns a 200 with {"ok": true}
if all the events managed to get processed.
If any of the events were invalid or if the API failed to decode them, it will return a 200 response, with
{"ok": false, "errors": [{"message": <Error message>, "json": <jsonString>}]}
which contains the Json for each event that failed.