Fuel product growth and team agility. Heap automatically captures web and mobile app behavioral data. Retroactively analyze behavioral data without writing code.
Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the Pipedream Node docs to learn more.
The Heap API enables you to automate and integrate your user analytics data with other applications. With Heap, you can extract insights on how users interact with your product, track events without code, and funnel this data into your CRM, marketing tools, or custom dashboards. It's about connecting the dots between user actions and your strategic moves. Heap's API lets you push or pull data, so you're always up-to-date on user behavior and can personalize user experiences at scale.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
heap: {
type: "app",
app: "heap",
}
},
async run({steps, $}) {
// From the docs: https://docs.heap.io/reference#track-1
// "Requests are limited to 30 requests per 30 seconds per identity per app_id"
return await axios($, {
method: "POST",
url: `https://heapanalytics.com/api/track`,
headers: {
"Content-Type": "application/json",
},
data: {
app_id: this.heap.$auth.app_id,
identity: params.identity,
event: params.event,
timestamp: params.timestamp || (new Date()).toISOString(),
properties: params.properties,
}
})
},
})
Develop, run and deploy your Node.js code in Pipedream workflows, using it between no-code steps, with connected accounts, or integrate Data Stores and File Stores.
This includes installing NPM packages, within your code without having to manage a package.json
file or running npm install
.
Below is an example of installing the axios
package in a Pipedream Node.js code step. Pipedream imports the axios
package, performs the API request, and shares the response with subsequent workflow steps:
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
async run({ steps, $ }) {
// Return data to use it in future steps
return steps.trigger.event
},
})