Skip to main content
Capture the Heap Session ID and User ID in your Invoca Tag, then use a custom post-call webhook to send call data and Signals to Heap.
Integrate Invoca call data and Signals with Heap using the Invoca Custom Webhook feature and Heap’s Track (server-side) API.

Before you begin

Two prerequisites require a Heap Technical Resource:
  1. Enable the Invoca Tag to retrieve the Heap Session ID and User ID from the dataLayer — typically via heap.getSessionId() and the heap.userId variable.
  2. Configure your Heap platform to accept two additional parameters in the Track server-side API — user_id and session_id — passed dynamically in the API call.
Both must be completed before configuring anything in Invoca.

Steps

  1. Create two new Marketing Data fields: heap_userID and heap_getSessionId.
  2. Create a new draft of your Invoca Tag to extract these values from the dataLayer, using the commands your Heap Technical Resource confirmed. Test using the Test button with ?invoca_rev=draft appended to your website URL, then call the phone number on the page to confirm the data was captured accurately.
  3. Once the Heap User ID and Session ID are appending correctly to calls, create a custom webhook to send this data to Heap:
    • Go to Integrations in the sidebar, then Custom Webhooks.
    • Click New Webhook, and choose Post-Call.
    • Name it descriptively (for example, “Heap”).
    • Set the method to POST and enter the Heap Track (server-side) API endpoint as the URL.
    • Set Content-Type to JSON and add your JSON body request, using “Add Substitute Parameter < >” for dynamic values.
    • Under Firing Conditions, set Fire On to “All call-related transactions.”
    • Save your configuration.
  4. Test by calling an Invoca number from your website and confirming the Heap IDs are captured and passed through the new webhook.

Where to go next

Last modified on September 25, 2026