Category: Datasources
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Integrate Appsmith with Amplitude

Issue

I need help with importing and using the amplitude library to track events on my Appsmith dashboard. I am wondering how to authenticate with the API key and which functions to use to track the events. Should I fire the API on onClick events or on page load?

Resolution

To track Appsmith dashboard events using Amplitude, you can integrate with Amplitude’s HTTP V2 API by creating an Authenticated API datasource and triggering it from widget actions such as onClick or onPageLoad.

Authentication with API Key

Amplitude uses an API key for authentication. In Appsmith, you can configure this by:

  • Setting the Authentication Type to API Key when creating the datasource
  • Optionally adding headers like Content-Type: application/json

This setup enables you to securely send event data to Amplitude from within your Appsmith apps.

When to Trigger Tracking Calls

You can trigger the tracking API from:

  • Button or component onClick events – for capturing user interactions
  • Page onPageLoad actions – to log page views or dashboard loads

Example: trackEvent.run(); // Call the API when a user lands on a page or clicks a CTA

Need Help Getting Started?

Check out our guide for creating and configuring authenticated APIs in Appsmith: Authenticated API Datasource Documentation

This integration gives you powerful insight into user behavior and interaction patterns, right from your Appsmith dashboards—no SDKs required.