Heap.push is not a function Console Error

Oftentimes the heap.push error occurs when Heap is unintentionally loaded twice on a site. For example, Heap might be loading once from the Heap snippet in your </head> tag (inserted during Web Installation) and also through a tag manager such as Google Tag Manager (GTM), Tealium, or Segment.

The error typically presents itself within the Developer Console when a Heap API call is made. In the example below, the heap.track call results in the heap.push error. 

A screenshot of the Google Chrome Developer Console where the API call Heap.track results in an error that reads "window.heap.push is not a function"

The fix for this error is to remove all extra instances of Heap and ensure it is only loading a single time on your site.

Last updated