Like any script, Heap can be installed via Google Tag Manager, or GTM for short. Because of the way GTM works, we strongly recommend setting the highest priority for Heap to be loaded.
To install, add the Heap snippet as a custom HTMLtag and set it to fire on All Pages.
If you have not yet installed Heap, you'll find your snippet on our install page. If using the snippet above, remember to replace YOUR_APP_ID with the ID of the environment to which you want to send data. You can find this ID within your account settings under the Project tab.