This guide explains how to embed our donation forms on your website. You have three installation options, depending on your content management system and how you want the form to appear.
All three options support automatic resizing — the form grows and shrinks as the donor selects amounts, opens payment options, or triggers validation messages, so there are never scrollbars inside the form.
Quick start
Pick the option that fits your needs:
Option | When to use it |
Modal popup | You want a "Donate" button somewhere on your site that opens the form in a centered popup over the page. Recommended for header CTAs, sidebar widgets, and inline call-to-actions inside articles. |
Inline iframe (widget) | You want the donation form to appear directly on a page, like an embedded block. Recommended for dedicated campaigns or "donate" landing pages. |
Standalone iframe | Your CMS strips |
The first two options share the same script file. You include it once per page and use as many embeds as you like.
Note that in these code examples, you will replace
https://secureddonation.com/en/give/demoform
with the actual URL of your donation form.
Option 1 — Modal popup (recommended)
Add a button or link with the data-givingtech-modal attribute. When clicked, the donation form opens in a centered modal with a darkened backdrop.
<button data-givingtech-modal="https://secureddonation.com/en/give/demoform">Donate Now </button>
<script src="https://secured.givingtech.org/Content/js/givingtech-embed.js" async></script>
You can use any element — button, link, or styled <div>:
<a href="#" data-givingtech-modal="https://secureddonation.com/en/give/demoform">Support our work</a>
<button class="my-custom-button" data-givingtech-modal="https://secureddonation.com/en/give/demoform" data-givingtech-title="Support our Spring Campaign">Give today</button>
The modal closes when:
The donor clicks the X button in the top-right corner
The donor presses the Esc key
The donor clicks outside the modal on the dark backdrop
Opening the modal from your own JavaScript
If you'd rather open the modal from your own code (for example, after a user finishes reading a video), use the GivingTech.openModal() function:
GivingTech.openModal('https://secureddonation.com/en/give/demoform', 'Support our Spring Campaign')
To close it programmatically:
GivingTech.closeModal()
Option 2 — Inline iframe (recommended)
Paste this anywhere on your page where you want the donation form to appear:
html
<div data-givingtech="https://secureddonation.com/en/give/demoform"></div> <script src="https://secureddonation.com/Content/js/givingtech-embed.js" async></script>
The form will render at the full width of the surrounding container and auto-resize as the donor interacts with it. The <script> tag only needs to appear once per page, even if you have multiple donation forms or modal buttons.
Optional: customize the iframe title for accessibility
<div data-givingtech="https://secureddonation.com/en/give/demoform" data-givingtech-title="Donate to our Spring Campaign"></div>
Option 3 — Standalone iframe (CMS fallback)
Use this only if your CMS will not let you include a <script> tag. It's a single self-contained <iframe> element that loads our resize handler on its own:
html
<div style="width:100%;max-width:100%;overflow:hidden;">
<iframe src="https://secureddonation.com/en/give/demoform" title="GivingTech Donation Form" scrolling="no" style="width:1px;min-width:100%;border:none;display:block;" allow="payment" onload="!function(d,id){if(!d.getElementById(id)){var s=d.createElement('script');s.id=id;s.src='https://www.secureddonation.com/Content/js/givingtech-embed.js';d.head.appendChild(s)}}(document,'givingtech-embed-js')"></iframe> </div>
This version is functionally equivalent to Option 2, but doesn't require a separate <script> tag — the iframe boots the script itself once it loads. Note that this option does not support modal popups or dynamic content (forms added to the page after initial load).
UTM and campaign tracking
Our embed script automatically forwards tracking parameters from your page URL into the donation form, so attribution data — where the donor came from, which campaign brought them in, which ad they clicked — is preserved through the donation.
How it works
If a donor lands on a page like:
https://yoursite.org/spring-appeal?utm_source=facebook&utm_campaign=spring2026
…and that page contains your embed snippet, the donation form URL is automatically rewritten to:
https://secureddonation.com/en/give/demoform?utm_source=facebook&utm_campaign=spring2026
You don't need to do anything for this to work. It happens automatically.
Precedence rule
If you hardcode a parameter in your embed URL, it takes precedence over whatever's on the parent page URL. For example, given this embed:
<div data-givingtech="https://secureddonation.com/en/give/demoform?utm_campaign=evergreen"></div>
…even if the parent page URL has ?utm_campaign=spring2026, the donation form will use utm_campaign=evergreen. This lets you pin certain values for specific landing pages without worrying about parent-page params overwriting them.
Troubleshooting
The form doesn't appear. Check the browser console for errors. Make sure the <script> tag is included on the page (or use Option 3 if your CMS strips scripts). Verify the URL in data-givingtech is correct and uses HTTPS.
The form appears but doesn't resize. The most likely cause is that your CMS or theme is loading the form in a different iframe or container. Confirm that the iframe's src is pointing to your donation form
The modal doesn't open when I click the button. Confirm the <script> is loaded (check Network tab in browser dev tools). If you have a JavaScript framework that prevents default click events globally, you may need to call GivingTech.openModal(...) from your own click handler instead of using data-givingtech-modal.
UTM parameters aren't carrying through. Check the actual URL in the browser address bar — many sites strip UTMs after capturing them to a cookie or analytics tool. If your site does this, hardcode the values into the embed URL itself, or use server-side rendering to inject them.
The form looks too narrow. The form fills 100% of its parent container's width. If you want a specific maximum width, wrap it:
<div style="max-width: 600px; margin: 0 auto;">
<div data-givingtech="https://secureddonation.com/en/give/demoform"></div> </div>
Reference: all data attributes
Attribute | Used on | Purpose |
| Inline iframe container | The donation form URL to embed |
| Modal trigger button/link | The donation form URL to open in a modal |
| Either | Accessible title for the iframe (default: "GivingTech Donation Form") |
| Either | Comma-separated list of URL params to forward from parent page (default: standard UTMs + click IDs). Use |
Support
If you run into any issues that aren't covered here, please contact us by live chat and provide us with:
The URL of the page where you're trying to embed the form
The exact embed code you've pasted
A screenshot of what you're seeing (if it's a visual issue)
Any errors from your browser's developer console
