Last active
July 28, 2016 10:22
-
-
Save oarashi/482784a3e4f34669b2056ca73bf57e21 to your computer and use it in GitHub Desktop.
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> | |
var order = App.getOrder({version: 'v1'}); | |
var talkable_subtotal = 0; | |
if (order.subtotal > 0){ talkable_subtotal = order.subtotal / 100; } | |
var _talkable_data = { | |
purchase: { | |
order_number: order.number, | |
email: order.buyer.email, | |
first_name: order.buyer.first_name, | |
last_name: order.buyer.last_name, | |
subtotal: talkable_subtotal, | |
coupon_code: order.discount_code | |
} | |
}; | |
window._talkableq = window._talkableq || []; | |
window._talkableq.push(["register_purchase", _talkable_data]); | |
</script> | |
<script src="//d2jjzw81hqbuqv.cloudfront.net/integration/clients/blink.min.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment