Via Heap Webhooks
Topics
Overview
You might have your product analytics data already in tools like Heap, Amplitude, Mixpanel or similar and you integrated with such tool directly - via SDK, code snippets, etc. (not via Segment). And might also built around those tools to qualify/label events you find important and identify users/grouping them in cohorts.
Amazing! Most of these tools have Webhooks functionality to trigger on a particular events and this how you can bring data to journy - again via API/SDK or Segment.
What’s Heap?
In short, Heap is a product analytics platform.
It allows customer success teams, marketers, and product managers to track user interactions with the product across all touchpoints in the user journeys.
Thanks to the data, product teams can gain a better understanding of their needs and make data-driven decisions to improve conversions, and retention and deliver experiences that delight customers.
What’s Heap Webhooks?
Heap has a Webhook functionality to make a POST request upon specify labeled event. You can send this request to an arbitrary URL and construct JSON payload you want (included nested structure) using some hard-coded values but also dynamic properties of User/Session/Page and Event itself.
Exactly what journy needs!
As we are writing this article (Jan’25) Heap Webhooks were in Beta and you need to contact Heap Sales team to turn it on. We did it and tested it in and out. And we confirm it’s working and sending necessary data to journy.io via SDK or Segment.
Sametime, some advanced features like Auditlog, datetime formatting, datetime and string functions were missing.
How to forward Heap events to journy?
Label your events
First you need to label some of the key events you want pass to journy.
Go to Data>Explore raw events and Raw events table underneath.
Scroll through to find out the event you need and click Label event.
You can see a complete list of your labeled events at Labeled events page.
Create hooks
Go to Integrations>Directory and type Webhook
If it’s not turned on you might need to reach out to Heap Sales team to enable.
Click New WebHook
For URL use
Make sure you add the following headers
Header | Value |
---|---|
Content-Type | application/json |
.. and construct JSON according to the Specs above.
To get Journy.io WriteKey go to Connections and either use existing SDK connection or create a new one.
Test it out
Go to you App or website. Do the actions that will cause your Heap labeled events to happen.
Go to Heap and check they were recorded
As of now (Jan’25) there’s no AuditLog for Webhooks in Heap so you won't be able to confirm the webhook was sent. You can check whether it was received in journy.io
Go to your Connections in journy.io and find your SDK Connection. Click Logs and if already there Refresh.
Troubleshooting
Common mistakes are the following:
Make sure URL is correct one & matching event type - Identify, Group and Track
Make sure <Content-Type, application/json>Header is specified
For now (Jan’25) Heap only supports POST. If there’re options make sure it’s POST request
Make sure journy.io key is correct one
Make sure your parameters/properties definition (escaping, markdown, etc.) are not making the result JSON invalid. Try without them!