-
-
Save kanwei/c6bf0ffe57f3368217b5f379e3b4ad6c 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 src="https://doublethedonation.com/api/js/ddplugin.js"></script> | |
<link href="https://doublethedonation.com/api/css/ddplugin.css" rel="stylesheet"/> | |
<script> | |
var DDCONF = { API_KEY: "xxxxxxxxxxxxxxxxx" }; | |
if (window.doublethedonation) { // Don't break your page if our plugin doesn't load for any reason | |
jQuery(".webform-confirmation h1").first().after(jQuery("<div id='dtd-confirmation-container'></div>")); | |
doublethedonation.plugin.load_plugin(jQuery("#dtd-confirmation-container")[0]); | |
var dtd_email = "[donation:mail]"; | |
var domain = doublethedonation.integrations.core.strip_domain(dtd_email); | |
var dtd_identifier = "[donation:did]"; | |
var dtd_campaign = "[webform:val-acquisition_campaign]"; | |
doublethedonation.plugin.set_donation_identifier(dtd_identifier); | |
doublethedonation.plugin.set_donation_campaign(dtd_campaign); | |
doublethedonation.plugin.email_domain(domain); | |
doublethedonation.integrations.core.register_donation({ | |
"360matchpro_public_key": DDCONF.API_KEY, // Replace this key with the client's 360MatchPro public key. | |
"campaign": dtd_campaign, | |
"donation_identifier": dtd_identifier, | |
"donation_amount": "[donation:amount]", | |
"donor_first_name": "[donation:first_name]", | |
"donor_last_name": "[donation:last_name]", | |
"donor_email": dtd_email, | |
"donor_address": {"zip": [donation:zip], | |
"city": "[donation:city]", | |
"state": "[donation:state]", | |
"address1": "[donation:address]", | |
"address2": "[donation:address_line_2]"} | |
}); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment