Last active
May 3, 2019 16:18
-
-
Save arasmussen/31f2eec8f39127b4405df91770d16606 to your computer and use it in GitHub Desktop.
Podia + Canny install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// Add this to the "Website tracking code" section | |
setTimeout(function() { | |
if (Podia.Customer) { | |
// Download the Canny SDK | |
!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"); | |
// Identify your user | |
Canny('identify', { | |
appID: 'YOUR_APP_ID', | |
user: { | |
email: Podia.Customer.email, | |
name: Podia.Customer.first_name + ' ' + Podia.Customer.last_name, | |
id: Podia.Customer.id, | |
created: new Date(Podia.Customer.created_at).toISOString(), | |
}, | |
}); | |
} | |
}, 0); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment