---
title: "Double the Donation Integration"
slug: "double-the-donation-integration"
updated: 2026-04-28T17:10:52Z
published: 2026-04-28T17:10:52Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Double the Donation Integration

**Double the Donation** adds a search to your donation form that determines if a donor’s employer provides matching gifts. This solution then provides qualifying donors with actionable matching gift next steps, making it easy for donors to immediately double their donation. The search details, including any applicable gift information, are sent to Double the Donation for further management of any expected matching gifts.

> [!NOTE]
> 🔑You’ll need a Double the Donation account to activate this integration.
> 
> Not a Double the Donation client? Schedule a demo at [https://doublethedonation.com/get-a-demo/](https://doublethedonation.com/get-a-demo/)

Adding this integration to an existing giving form involves several steps, including the customization of both the **form**and the **confirmation page.**

Each step in this process is critical to the integration. It is recommended that you follow along with this video and the written instructions below.

[Embedded content](https://www.youtube.com/embed/4EnuvwuHmlk)

## Modifying the Giving Form

Adding the matching gift search capability from Double the Donation requires several modifications to a giving form. The ultimate goal of these modifications is to capture the company information selected by a donor, store it on the form, and pass it through to both the confirmation page and the Double the Donation platform.

### Step 1: Add JavaScript to the Form

The first modification involves adding JavaScript code to the form. To add the code:

1. Starting on the form summary page, click **Edit Form**. The **Edit Form** page appears.
2. Click **Edit Scripts / Styles**. An **Edit Scripts / Styles** popup appears.
3. Copy the following script and paste it into the popup **Custom Scripts** field:

```javascript
if (window.doublethedonation) { 
//Load the search into a DOM element with id="dd-company-name-input"
doublethedonation.plugin.load_streamlined_input();
}

$(document).ready(function(){
form.ValidateInternal = form.Validate;
form.Validate = function (silent)
{
var selectedCompanyID = document.getElementsByName("doublethedonation_company_id")[0].value;
var selectedCompanyName = document.getElementsByName("doublethedonation_company_name")[0].value;

form.getElement('company-id').val(selectedCompanyID);
form.getElement('company-name').val(selectedCompanyName);
form.setValue("campaign", $("div[data-export='sys:gift:campaign']:first").find("option:selected").text());
return (form.ValidateInternal(silent));
};
});
```
4. Click **Save**.

> [!WARNING]
> 📝 Note
> 
> Custom CSS in this section can effect the functionality of the Double the Donation company search bar, which is covered in the next step. After you complete this process, if the company search bar does not load, replace the above script with the following, which will refresh the form every five milliseconds until the company search bar loads on the page.

```javascript
$(document).ready(function(){
form.ValidateInternal = form.Validate;
form.Validate = function (silent)
{
var selectedCompanyID = document.getElementsByName("doublethedonation_company_id")[0].value;
var selectedCompanyName = document.getElementsByName("doublethedonation_company_name")[0].value;

form.getElement('company-id').val(selectedCompanyID);
form.getElement('company-name').val(selectedCompanyName);
form.setValue("campaign", $("div[data-export='sys:gift:campaign']:first").find("option:selected").text());
return (form.ValidateInternal(silent));
};
var DTDTimer = window.setInterval(LoadDTD, 5);
var num = 0;
function LoadDTD()
{	
  if (window.doublethedonation)
  {		
    //Load the search into a DOM element with id="dd-company-name-input"
    doublethedonation.plugin.load_streamlined_input();
		window.clearInterval(DTDTimer);
  }  
}
});
```

### Step 2: Add the company search function

The search function takes place within an *Instructions* form field. To add the search:

1. Add an ***Instructions***form field where you want a donor to search for their employer. An **Edit Field** popup appears.
2. Click ***Source***at the top of the WYSIWYG editor. A **Source** popup appears.
3. Copy the following JavaScript code and paste it into the source popup:

```xml
<script src="https://doublethedonation.com/api/js/ddplugin.js" /><link href="https://doublethedonation.com/api/css/ddplugin.css" rel="stylesheet" /><div id="dd-company-name-input" /><script>
// Insert your Double the Donation Public Key below
var DDCONF = {API_KEY: "YOUR_PUBLIC_KEY"};
</script>
```
4. Replace `YOUR_PUBLIC_KEY`****with the public key provided to you by Double the Donation, making sure the public key is between the quotation marks.
5. Click **OK** to return to the **Edit Field** popup. The text box will appear empty - this is fine.
6. Click **Save**.
7. *Optional*: Add an additional **Instructions**form field to add context for the donor. E.g., *You may be able to double your donation! Search to see if your employer contributes matching gifts.*

### Step 3: Add required form fields

The following **system fields** are required and are used to send donor and gift information to the Double the Donation platform:

- First Name `{{sys-first}}`
- Last Name `{{sys-last}}`
- Donor Email `{{sys-email}}`

A Slate Payments[Payment Form widget](/v1/docs/form-payment-widget) is also required and will automatically populate the `{{Form-Payment-Receipt.amount}}`and `{{Form-Recurring-Payment.amount}}`as needed.

The following **hidden fields** capture and store the details of the company searched for by the donor.

The export value for these fields must exactly match to be appropriately processed by the JavaScript function. Add each of these fields as a **text box**.

> [!CAUTION]
> 🔔 Important!
> 
> Do not place the hidden fields in a [replicate block](/v1/docs/replicate-blocks).

**Company ID**(*Required*)

- **Label:**Company ID
- **System Field:**Leave blank
- **Export Key:**company-id
- **Options:**Hidden (accessible through script)

**Company Name**(*Required*)

- **Label:** Company Name
- **System Field:**Leave blank
- **Export Key:**company-name
- **Options:**Hidden (accessible through script)

**First Campaign**(*Optional*)

- **Label:**First Campaign
- **System Field:**Leave blank
- **Export Key:**campaign
- **Options:**Hidden (accessible through script)

> [!NOTE]
> 💡Information about First Campaign
> 
> - This optional field allows Double the Donation to attribute a match to the correct fundraising initiative.
> - When used, the form automatically pulls the value from the `{{sys:gift:campaign}}` system field into **First Campaign** upon submission.
> - Any default value will be overridden by the Gift – Campaign value.
> - If no Gift – Campaign field is present or it has no value, **First Campaign** will be null. The provided script accounts for null values, ensuring gift data is still sent to Double the Donation even if no campaign is set.

This completes modification to the form. Add other desired fields to your form as usual.

## Modifying the confirmation page

The confirmation page must be updated to display the matching gift details for the company selected on the form. The confirmation page also serves as the mechanism to send the donation and employer details to the Double the Donation platform through the use of JavaScript.

### Step 1: Add styling and JavaScript to the confirmation page

1. On the summary page for the form, click **Edit Communications**.
2. Locate the confirmation page (or create a new one) and click **Edit Mailing**.
3. On the communications page, click **Edit Message**.
4. Click **Source** at the top of the WYSIWYG editor.
5. Copy the following code and paste it between the <head> tags:

```xml
<script src="https://doublethedonation.com/api/js/ddplugin.js"></script>
<style type="text/css"><link href="https://doublethedonation.com/api/css/ddplugin.css" rel="stylesheet" />
</style>
```
6. Copy the following code and paste it inside the <body> tags:

> [!NOTE]
> 📝 This code was updated on July 29, 2024 to accommodate the optional **First Campaign** field.

```xml
<script>
// ***IMPORTANT***
// The following script has been developed to integrate directly with Double the Donation's platform. Only modify script below when adding your public key.
// Additional modifications may negatively impact the connection to Double the Donation.
// Also, the <div id="dd-container"> below is required, as it's where the Double the Donation content is rendered.
$(function() {
if (window.doublethedonation) {
// Don't break your page if the DD plugin doesn't load for any reason
doublethedonation.integrations.core.register_donation({
"360matchpro_public_key": "YOUR_PUBLIC_KEY", // Your Double the Donation Public Key
"partner_identifier": "TECHN-o6cMgAqsuHzMK0FQ", // Do not change the partner_identifer. This is for Technolutions.
"campaign": "{{campaign}}" || "No Campaign Selected",
"donation_identifier": "{{Double-the-Donation-Integration-GUID}}",
"donation_amount": {{Form-Payment-Receipt.amount}}{{Form-Recurring-Payment.amount}},
"donor_first_name": "{{sys-first}}",
"donor_last_name": "{{sys-last}}",
"donor_email": "{{sys-email}}",
"donor_phone": "{{sys-phone}}",
"doublethedonation_company_id": "{{company-id}}",
"doublethedonation_entered_text": "{{company-name}}"
});
};
});
var campaign = "{{campaign}}" || "No Campaign Selected";
var donation_id = "{{Double-the-Donation-Integration-GUID}}";
var dtd_selected_company = "{{company-id}}";
// Your Double the Donation Public Key
var DDCONF = {API_KEY: "YOUR_PUBLIC_KEY", COMPANY: dtd_selected_company};
if (window.doublethedonation) { // Don't break your page if our plugin doesn't load for any reason
doublethedonation.plugin.load_config();
doublethedonation.plugin.set_donation_identifier(donation_id);
doublethedonation.plugin.set_donation_campaign(campaign);
if (dtd_selected_company) {
doublethedonation.plugin.set_company(dtd_selected_company);
} else {
var email = "{{sys-email}}";
var domain = doublethedonation.integrations.core.strip_domain(email) ;
doublethedonation.plugin.email_domain( domain ); // Checks for a company based on the email address.
}
doublethedonation.plugin.load_plugin();
}
</script>
<div id="dd-container">
</div>
<div id="dd-company-name-input">
</div>
```
7. Replace the text `YOUR_PUBLIC_KEY` with the public key provided by Double the Donation. ***There are two places in this code to replace the key text.***
8. If you wish to add personalized text to the confirmation page, include it before the `&lt;script&gt;` tag in the body of the message.
9. Click **OK** to return to the Edit Message popup.
10. Click **Save** to return to the communications page for the confirmation page.

> [!NOTE]
> 🔔 Warnings and Errors
> 
> The confirmation page will display a couple of pre-flight check warnings and an error message stating that the message body contains<script> tags. These messages can be safely ignored.

### Step 2: Add the form’s GUID as a merge field

The confirmation page must include the GUID of the form. This unique ID serves as a donation identifier with the Double the Donation platform.

1. On the communications page, click **Edit Conditions**.
2. Click **Export**.
3. In the **Direct Exports** section, select the **GUID** export for the form.

> [!CAUTION]
> Important: If you have other joins present, be sure you are choosing the form GUID.
4. Click **Continue** to return to the **Edit Conditions** popup.
5. Double click the export to change the **Name** to **Double the Donation Integration GUID**.
6. Click **Save** to return to the **Edit Conditions** popup.
7. Click **Save** to return to the communications page.

This completes modification to the confirmation page.

## Troubleshooting & Tips

If your Double the Donation integration is not working as expected, please check for these common issues:

- ### 🔧 Company Search Bar Not Loading

If the company search bar does not appear:

---

### ⚠️ Hidden Field Placement

The following hidden Double the Donation fields:

**Must NOT be placed inside a replicate block**

---

### 🔑 Public Key Setup

Replace `YOUR_PUBLIC_KEY` with your actual public key from Double the Donation.

**Important:**

---

### 🎨 Confirmation Page Styling Issues

Custom styling on the confirmation page is a **common cause of integration issues**.

**Best practices:**

This approach helps:

---

### 🧩 GUID Selection in Form Conditions Export
  - This is typically caused by **custom CSS blocking the script**
  - Return to **Step 1: Add JavaScript to the Form**
  - Replace the original script with the **alternative script**
  - Company ID
  - Company Name
  - First Campaign
  - This must be done in **three places total**:
    - Once in the **Company Search JavaScript**
    - Twice in the **Confirmation Page JavaScript**
  - The key **must remain inside quotation marks**
  - Thoroughly test any custom styling
  - Consider using **two confirmation pages**:
    - One for **Double the Donation submissions** (keep styling simple)
    - One for **standard donations** (can include more complex styling)
  - Preserve integration functionality
  - Maintain design flexibility where it’s safe
  - Ensure you select the **correct GUID**, especially if your export includes joins
  - Use the GUID tied directly to the **form**
  - It will appear **directly above “System exports”**
