Last active
March 16, 2017 17:21
-
-
Save clayb/4df572f661f94320f4067d362f3d89fc to your computer and use it in GitHub Desktop.
Convio Optimizely Form Submission/Revenue Tracking
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
<!-- START optimizely Total Revenue Goal --> | |
<script type="text/javascript"> | |
var donationAmount = '[[E130:"[[S120:dc:giftAmount]]" "$" "" replaceall]]'; | |
donationAmount = donationAmount.replace(/,/g, '') * 100; | |
window.optimizely = window.optimizely || []; | |
window.optimizely.push(['trackEvent', 'donation_success', {'revenue': donationAmount}]); | |
</script> | |
<!-- END optimizely Total Revenue Goal --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment