Skip to content

Instantly share code, notes, and snippets.

@dngrmice
Last active August 29, 2015 14:02
Show Gist options
  • Save dngrmice/065f9778e259b5b081e5 to your computer and use it in GitHub Desktop.
Save dngrmice/065f9778e259b5b081e5 to your computer and use it in GitHub Desktop.
<!-- EXAMPLE ON HOW TO USE DYNAMIC CONTENT -->
<h1 id="dynamicContentID">Hi There,</h1>
<script type='text/javascript'>
var callThisOnReturn = function(resp) {
if (resp && resp.contact) {
var contact = resp.contact;
console.warn('Contact Info Received', contact); // just an example
var elem = document.getElementById('dynamicContentID');
elem.text = 'Hi ' + contact.firstName;
}
};
</script>
<script type='text/javascript'>
var _ss = _ss || [];
_ss.push(['_setDomain', 'http://app.sharpspring.com/net/']);
_ss.push(['_setAccount', 'KOI-XXXXX']);
_ss.push(['_setResponseCallback', callThisOnReturn]);
_ss.push(['_trackPageView']);
(function() {
var ss = document.createElement('script');
ss.type = 'text/javascript'; ss.async = true;
ss.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'koi-xxxxx.sharpspring.com' + '/client/ss.js';
var scr = document.getElementsByTagName('script')[0];
scr.parentNode.insertBefore(ss, scr);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment