Skip to content

Instantly share code, notes, and snippets.

@nchudleigh
Created November 2, 2016 17:32
Show Gist options
  • Save nchudleigh/9b7b766d4a294c9b74f7578151d3e6f1 to your computer and use it in GitHub Desktop.
Save nchudleigh/9b7b766d4a294c9b74f7578151d3e6f1 to your computer and use it in GitHub Desktop.
GrowSumoJS Loader
<script type='text/javascript'>!function(){var t=document.createElement("script");t.src="https://snippet.growsumo.com/growsumo.min.js",t.type="text/javascript",t.async="true",t.onload=t.onreadystatechange=function(){var t=this.readyState;if(!t||"complete"==t||"loaded"==t)try{growsumo._initialize("<REPLACE WITH YOUR PUBLIC KEY>"),"function"==typeof growsumoInit&&growsumoInit()}catch(e){}};var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}();</script>
<script>
// This function is called when GrowSumoJS is loaded
function growsumoInit(){
console.log('GrowSumoJS loaded', growsumo);
}
</script>
@nchudleigh
Copy link
Author

Make sure that you replace <YOUR PUBLIC KEY HERE> with your public key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment