Skip to content

Instantly share code, notes, and snippets.

@skipjac
Created April 16, 2011 01:45
Show Gist options
  • Select an option

  • Save skipjac/922762 to your computer and use it in GitHub Desktop.

Select an option

Save skipjac/922762 to your computer and use it in GitHub Desktop.
This is a custom widget in Zendesk that gets the help desk total user count
<div id="userCnt">
</div>
<script type="javascript">
$j(document).ready(function() {
$j.get('/people.xml', function(d) {
var countopen = $j(d).find('record').parent().attr('count');
if(!countopen){countopen = 0;}
$j('#userCnt').append("<p>"+countopen + " users in your help desk.<\/p>") ;
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment