Embedding with Tag Management

This example demonstrates how to embed WhosOn using a Google Tag Manager, however this same logic can apply to other Tag Management softwares when choosing a HTML or Raw code tag.
1. Login to Google Tag Manager and create a new tag type of 'Custom HTML'
2. Rename the Tag to a suitable name, i.e. WhosOn.
3. Copy and paste the following script into the HTML text-area.
<script async="" type="text/javascript">

(function() {

var script = document.createElement('script');
script.src = '//chat.whoson.com/include.js?domain=www.example.com';
document.getElementsByTagName('head')[0].appendChild(script);

var done = false;

script.onload = handleLoad;
script.onreadystatechange = handleReadyStateChange;

function handleLoad() {
if (!done) {
done = true;
if(sWOTrackPage)sWOTrackPage();
}
}

function handleReadyStateChange() {
var state;

if (!done) {
state = script.readyState;
if (state === "complete") {
handleLoad();
}
}
}

})(); 
</script>
Remember to replace the script.src value with the location of your sites unique include.js path.
4. Finally, add a trigger set to All Pages and then publish.