Code block and Code Injection

Add a donation form to Squarespace

On Squarespace, the box goes into a Code block on the page you choose, and the button goes into Code Injection so it shows on every page.

Squarespace

Add the donation box

Paste the box code where the form should appear.

  1. Copy the donation box code from Installation in your GivePilot console.
  2. Edit the page in Squarespace, add a block, choose Code and paste the code.
  3. Save, publish and open the page once. GivePilot sees the box go live.
Donation box inside a page
<div data-givepilot="donate"></div>
<script async src="https://givepilot.dudelemon.cloud/donate/donate.js" data-site="YOUR_SITE_KEY" data-api="https://givepilot.dudelemon.cloud/api/don/v1"></script>

Your console fills in your own site key.

Add a donate button to every page

A floating Donate button that opens the full box over any page of Squarespace.

  1. Copy the donate button code from Installation.
  2. Open Code Injection in your site settings and paste it into the Header field.
  3. Save. The Donate button now shows on every page.
Donate button on every page
<script async src="https://givepilot.dudelemon.cloud/donate/donate.js" data-site="YOUR_SITE_KEY" data-api="https://givepilot.dudelemon.cloud/api/don/v1"></script>

Paste just before the closing head tag.

Good to know on Squarespace

Check your plan includes custom code

Squarespace runs scripts in Code blocks and Code Injection only on plans that include custom code. If Code Injection is missing from your settings, your plan does not include it.

Questions about GivePilot on Squarespace

Can I put the box on more than one page?
Yes. Add a Code block with the box code to each page where you want it.
Does it match my Squarespace template?
The box takes your site’s font and the colour you choose in GivePilot, so it sits naturally in any template.
Do donations go through Squarespace Commerce?
No. Donations are paid into the Stripe, PayPal or Square account you connect in GivePilot.

Start taking donations on Squarespace

Set up in a few minutes, connect the payment account you already use and take your first gift before the day is out.