Last active
August 29, 2015 14:01
-
-
Save bonnie/bb1689d0bfa64eead3b0 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
<html> | |
<head> | |
<script type='text/javascript'> | |
// production widget JavaScript | |
document.write(unescape("%3Cscript%20src='"+(('https:' == document.location.protocol ? 'https://' : 'http://') + 'd3aa0ztdn3oibi.cloudfront.net/javascripts/ff.loyalty.widget.js')+"'%20type='text/javascript'%3E%3C/script%3E")); | |
// staging widget JavaScript; uncomment the line below and comment the line above to use the staging environment | |
//document.write(unescape("%3Cscript%20src='"+(('https:' == document.location.protocol ? 'https://' : 'http://') + 'd1iwtomgj4ct8d.cloudfront.net/javascripts/ff.loyalty.widget.stage.js')+"'%20type='text/javascript'%3E%3C/script%3E")); | |
</script> | |
<script type="text/javascript"> | |
// call an alert when the custom callback is invoked | |
function custom500FriendsCallback (arg) { | |
alert('callback action:' + arg['action'] + ' success') | |
} | |
</script> | |
<script type="text/javascript"> | |
// function to call the post-purchase widget | |
function postPurchase() | |
{ | |
_ffLoyalty.displayPostPurchaseWidget( | |
ACCOUNT_UUID, | |
{ | |
"email": EMAIL_ADDRESS, | |
"event_id": EVENT_ID, | |
"value": ORDER_VALUE, | |
"detail": ORDER_DETAIL, | |
"referral_tracking": true, | |
"cross_domain": true | |
} | |
); | |
} | |
</script> | |
</head> | |
<body> | |
<h1>Custom Callback Testing for Post Purchase Widget</h1> | |
<br><br> | |
<button onClick="postPurchase();">Test Now!</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment