script.js.You can restrict the visibility of AptEdge to specific users and user groups using conditional statements before initializing AptEdge in the script.js file:
if ( some condition ) {
// Add AptEdge snippet here
}
Attributes of the current signed-in user, such as their email, tags, role, and groups are accessible using the HelpCenter object provided by Zendesk. To see the available attributes:
HelpCenter, then press Enter to view the details of the object.For instance, to show AptEdge only for users with the tag “foo”:
if ( HelpCenter.user.tags.includes('foo') ) {
// Add AptEdge snippet here
}