<script>
// Find the widget's Shadow Root (all widgets are in shadow doms, so this is important)
let myRoot = customHtmlRoot.shadowRoot;
// personalized doc spot code
var id = "0";
var domain = "0";
window.onVanillaReady(function (vanilla) {
var user = vanilla.getCurrentUser();
id = user.userID;
domain = user.profileFields.domain;
let domainTrimmed = domain.replace('.percipio.com', '');
myRoot.getElementById('url_box').value = domainTrimmed;
});
</script>
<body>
<button class="percipio_link" onclick="window.location.href='https://<replace>.percipio.com/liveCourse/a7d1055d-aa38-40ed-89be-59b35c71cf0f';">View on Percipio</button>
</body>
View on Percipio