In order for theMarketer to record the necessary events from your site, you need to insert the following JavaScript code right before the closing of the <head> tag.
To use theMarketer you need the Tracking Key from your theMarketer account. The Tracking Key is automatically generated when you register your account, and you can find it in Settings -> Technical Integration.
This tracking code is loaded asynchronously, which means it won't slow down the page's load time in any way and it will work independently from your application.
<script>
(function(){
mktr_key = "TRACKING_KEY";
var mktr = document.createElement("script");
mktr.async = true;
mktr.src = "https://t.themarketer.com/t/j/" + mktr_key;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mktr,s);
})();
</script>