Please check the below snippet. Hope it helps
var tourLink = document.getElementById('starttour');
window.onload=function(){
document.getElementById("starttour").click();
};
tourLink.addEventListener('click', function () {
console.log("clicked on page load")
});
<a class="start-tour" href="#" id="starttour">
<span class="two skinny" style="margin:10px 5px; width:290px; font-weight:bold; letter-spacing:4px;">
<i class="fa fa-photo animated faa-pulse faa-slow"></i> Take a Detailed Tour
</span>
</a>