Skip to content

Instantly share code, notes, and snippets.

@dngrmice
Last active August 29, 2015 14:02
Show Gist options
  • Save dngrmice/12e393ad2cc0d20532f4 to your computer and use it in GitHub Desktop.
Save dngrmice/12e393ad2cc0d20532f4 to your computer and use it in GitHub Desktop.
<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>
<script type='text/javascript'>
// Example of how to send a transaction, must be run AFTER the first 2 push calls (_setDomain, _setAccount)
_ss.push(['_setTransaction', {
'transactionID': '1234',
'storeName': 'Acme Test Co.',
'total': '28.38',
'tax': '1.29',
'shipping': '15.00',
'city': 'San Jose',
'state': 'California',
'zipcode': '32608',
'country': 'USA'
}]);
_ss.push(['_addTransactionItem', {
'transactionID': '1234',
'itemCode': 'DD44',
'productName': 'T-Shirt',
'category': 'Olive Medium',
'price': '11.99',
'quantity': '1'
}]);
_ss.push(['_completeTransaction', {
'transactionID': '1234'
}]);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment