Nevermind guys I got it working, here is the solution below plus uppercase function:
Code:
cmCreatePageviewTag("<<label id="myDiv1"></label>>","<<label id="myDiv2"></label>>");
<script type="text/javascript">
document.getElementById("myDiv1").innerHTML = window.location.pathname.split('/').join(':').toUpperCase();
document.getElementById("myDiv2").innerHTML = top.location.pathname.replace(/\\/g,"/").replace( /\/[^\/]*$/, "" ).split('/').join(':').toUpperCase();
</script>