Skip to content

Instantly share code, notes, and snippets.

@cdwills
Created June 20, 2011 21:56
Show Gist options
  • Save cdwills/1036695 to your computer and use it in GitHub Desktop.
Save cdwills/1036695 to your computer and use it in GitHub Desktop.
Snippet for Zendesk Integration
if (window.ticket_id != undefined) {
recorder.addCustomData("Ticket", window.ticket_id);
} else if (window.location.pathname.match(/\/requests\/\d+$/) && window.ticket_id === undefined){
recorder.addCustomData("Ticket", window.location.pathname.split('/')[2];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment