GFM Pro - logo

Embed a donation form on Wix

Before you start

The first step is to create an embedded donation form on GoFundMe Pro.

Studio embedded forms in Wix only work when linked to a donate button. Adding an inline form to your page is not currently supported in Wix.

To embed a donation form on your Wix site, you'll need to:

  1. Safelist your website
  2. Install the code snippet
  3. Link the form to a button on your page

Safelist your website

To make sure your embedded form appears, safelist your website. If you need to add multiple domains (such as a test site or sandbox), follow these steps:

  1. Go to the Settings tab in the Studio designer
  2. Select Install
  3. Under Safelisted domains, add the URL of each website where you plan to embed the form
  4. Publish or Update your campaign to push through the changes

Install a code snippet

The Install snippet is a script that lets embedded campaigns appear on your site. You only need to add it once to your website’s <head> section, where it will work for all embedded campaigns.

Only add one Install snippet. Multiple snippets may slow down your website.

To copy the Install snippet:

  1. Go to the campaign’s Settings tab
  2. Select Install
  3. Next to Install snippet, select Copy

To add the Install script to Wix:

  1. Go to your Wix dashboard
  2. In the menu, select Settings
  3. Search for and select Custom Code
  4. Choose Add Custom Code
  5. Paste in the Install script
  6. Add code to all pages
  7. Place code in the Head and Apply

With the Install snippet added you’re ready to embed your donation form by linking it to a button. The embedded form will open anytime the button is selected.

To attach the form to a donate button:

  1. In your campaign’s Install page, select Copy campaign parameter
  2. Go to your Wix site’s editor
  3. Select your donate button
  4. Select the link icon
  5. Add the parameter to your website’s URL and link to it. For example, www.example.com/?campaign=12345

Legacy donation forms

If you're using a legacy inline embedded donation form, you can add it to your Wix site, but the process will differ slightly from other builders. To start:

  1. Go to your inline form's campaign editor
  2. Select the Installation tab
  3. Copy the embed code
  4. Go to your Wix site designer
  5. Select Add
  6. Select Embed Code and HTML Embed

HTML block option in Wix

  1. Place the block where you want the form to appear
  2. Increase the block's size to fit the form
    • You may need to adjust this later to get the size right.
  3. In the block, enter <div class="classy-inline-embed"></div>
  4. On the next line, paste in your embed code
  5. Find the elementSelector: line
  6. Replace everything between quotation marks with .classy-inline-embed

Wix inline embed with selector added.

You'll notice the form won't appear in the preview, but if you save and publish your site, it'll appear when you view it. If scrollbars appear, return to your site's editor and increase the size of the HTML block you added.

Safelist your Wix site

To ensure your embedded forms display correctly, safelist the unique URL Wix creates for iFrames.

To find the URL:

  1. Go to your Wix site
  2. Right-click on the embedded form and select Inspect
  3. Press Command + F (Mac) or Ctrl + F (Windows) and search for "iFrame"
  4. Copy the URL from src="..."

Add the URL to your safelist:

  1. Open GoFundMe Pro's campaign editor
  2. Go to the Details tab
  3. In the About section, add the URL to your safelist

Not seeing what you need?

Contact us