URLs that are loaded into or clicked within an Exago session can be classified as either internal or external to the host domain, requiring confirmation from users to access external URLs. Utilizing this Action Event, the following code specifies which URL domains should be classified as "internal", classifying all other URLs as "external" and requiring confirmation before accessing them.
Event Type: None
Language: JavaScript
Custom Code:
function ClassifyUrl(url)
{
/*Your logic here*/
return "internal"
/*Alternate logic here*/
return "external"
}
sessionInfo.JavascriptAction.SetJsCode("(" + ClassifyUrl.toString() + ")(clientInfo.urlToClassify)");
return sessionInfo.JavascriptAction;
Logic Example:
function ClassifyUrl(url)
{
if(url.includes("exagoinc.com"))
return "internal"
else
return "external";
}