Skip to content

Instantly share code, notes, and snippets.

@10foldsolutions
Created May 29, 2018 16:08
Show Gist options
  • Save 10foldsolutions/914d1c729b8c49b35b093399b86a7878 to your computer and use it in GitHub Desktop.
Save 10foldsolutions/914d1c729b8c49b35b093399b86a7878 to your computer and use it in GitHub Desktop.
<script>!function(w,d,i,s){function l(){if(!d.getElementById(i)){var f=d.getElementsByTagName(s)[0],e=d.createElement(s);e.type="text/javascript",e.async=!0,e.src="https://canny.io/sdk.js",f.parentNode.insertBefore(e,f)}}if("function"!=typeof w.Canny){var c=function(){c.q.push(arguments)};c.q=[],w.Canny=c,"complete"===d.readyState?l():w.attachEvent?w.attachEvent("onload",l):w.addEventListener("load",l,!1)}}(window,document,"canny-jssdk","script");</script>
<script type="text/javascript">
Canny('identify', {
appID: '5ada60c895e6667ef5f73ac6',
user: {
// avatarURL: viewer.avatarURL, // optional
//created: new Date(viewer.created).toISOString(), // optional
email: '<?php echo $_SESSION['email']; ?>',
id: <?php echo $accountID; ?>,
companies: viewer.companies.map((company) => ({
id: '<?php echo $accountID.'-'.$accountChargiyID; ?>',
monthlySpend: '<?php echo $planCost; ?>',
name: '<?php echo str_replace("'", "\'", $accountCompany); ?>'
})),
name: '<?php echo str_replace("'", "\'", $accountFirstName).' '.str_replace("'", "\'", $accountLastName); ?>'
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment