Adding an element to your website
How to get the code from the Link Builder's Element tab that puts a donation form or a donation button on a page of your website, or makes your own button open a donation form, the cart or the Zakat calculator.
Where: Engage, Switch app, Link Builder
- If you can't see it
- Your organization doesn't have the Link Builder yet. Your N3O contact can switch it on.
When you're building a page on your website for an appeal, you'll want people to be able to give right there: a donation form under the appeal's story, perhaps, or a Donate button in your website's own style that opens the form with the appeal already chosen. Both come from your elements, the pieces that put giving on a page, and the Link Builder's Element tab gives you the code for either, ready to paste into the page. Open the Link Builder as The Link Builder describes, and select Element at the top.
The code works only on a page of your website that's set up to show your elements. Any page that already has one of your donation forms is set up. If you're not sure about a page, ask whoever set your website up for donation forms. The code doesn't work in an email, a text message, a QR code or a social post. To send people to an element from one of those, share a tracked link to the page it's on.
Choosing what to add
Under What do you want to add to your website?, choose one of these:
- A donation form, to show the form on the page or to open it from your own button
- A donation button, a ready-made Donate button that adds a gift to the cart or opens the donation form in one click
- A link that opens the cart, for your own button
- A link that opens the Zakat calculator, for your own button
Only the donation form and the donation button can sit on the page itself. If you want a Donate button of your own that opens the form, choose A donation form here. Then choose Use my own button or link when you add the code. The cart and checkout and The Zakat calculator describe what supporters see when each opens.
Choosing what the gift is for
For a donation form or a donation button, What is the gift for? decides what supporters give to:
- Visitor chooses, for a donation form only. Supporters pick what to give to on the form.
- A campaign, one of your campaigns.
- An offering, one way to give within a campaign. Each is listed with its campaign's name in front of it.
- A saved form or A saved button, a donation form or button your organization has already set up.
For every choice except Visitor chooses, type part of a name in the box beneath it, then pick from the list. If you type a name but don't pick it from the list, it doesn't count, and the Link Builder asks you to pick one. The lists show only what can be shown on a page right now, such as active campaigns and offerings. If a list is empty, the Link Builder says so, and you choose another option. Campaigns and offerings explains the two.
Filling in values ahead of time
The Options you add set what the form or button starts with, so a supporter has less to fill in. They work only when a supporter opens the form or button from your own button or link. They don't apply to a form or button shown on the page. Open Add an option…, choose one, and fill in its box. Only the options you add go into the link. Anything you leave out stays as your organization set up the form or button. To remove an option, select the cross beside it.
- Suggested amount is in your organization's main currency. Supporters giving in another currency see it converted. Select Keep this amount fixed so supporters can't change it.
- Giving type, for a donation form, is One-off or Regular giving.
- When clicked, for a donation button, is Add to cart, Begin checkout or Open donation form. A button with no amount opens the donation form instead.
- Start on a campaign and Start on an offering, for a donation form with Visitor chooses, set which campaign or offering the form opens on.
- Each of your organization's active fund dimensions is listed under its own name, and you can give it a value. The fund structure explains fund dimensions.
Adding the code to your page
The code appears under Add it to your website. On a wide screen it's on the right, and on a phone it's below your choices. Until the code is ready, the box there says what's still missing. The code you copy holds the choices you'd made at that moment. If you change them later, copy the new code and put it on your page in place of the old.
For a donation form or a donation button, choose how it goes on the page:
- Show it on the page puts the form or the ready-made button right where you paste the code, and the form is always open. Select Copy code, then paste it into an HTML or custom code block in your website's editor.
- Use my own button or link lets a button you add yourself open the form, or work as the donation button, when a supporter selects it. Once you've added an option, the Link Builder picks this for you.
Your own button or link
- In your website's editor, add a button or a link where you want it on the page.
- Select Copy link, then paste it in as the button's link. It starts with
n3o://. - For the Zakat calculator, also select Copy tag. Paste the tag once, anywhere on the same page, in an HTML or custom code block. The button doesn't work without it.
Some editors ask for an attribute instead of a link. If yours does, open My editor asks for an
attribute. Add an attribute named data-n3o to your button, with the value the Link Builder
shows. Editors usually keep attributes under Advanced or Attributes. Copy name and Copy
value copy each part. If your button already links to a page, such as your main donation page,
that link stays. A supporter goes there if the element can't open.
Code for a developer
Whoever manages your website's code can open Code for a developer to get the HTML for a whole button. For the Zakat calculator, the tag is included. Button text sets the words on the button. Page to open if it can't load sets a page, such as your main donation page, for a supporter to go to if the element can't open. We recommend setting one. Without it, a supporter whose click can't open the element sees a message saying it couldn't be loaded. Copy HTML copies the code.