Add Give Butter script to header #138

Open
opened 2025-03-25 17:32:02 +00:00 by joshua_davis · 7 comments
Owner

Not sure if this is technically an issue or just something else that we need to have done. Sorry if I'm filing this in the wrong place.

We moved from PayPal to Give Butter for fundraising and we would like to be able to embed one of their widgets on the site. Attached are Give Butter's instructions. I don't seem to have the ability to edit the header, so I'm guessing this is something you have to do. The code to add is:

Edit: Our coffers are running pretty dry right now and we need to do some emergency fundraising, so this is highest priority for us right now. Thanks.

Not sure if this is technically an issue or just something else that we need to have done. Sorry if I'm filing this in the wrong place. We moved from PayPal to Give Butter for fundraising and we would like to be able to embed one of their widgets on the site. Attached are Give Butter's instructions. I don't seem to have the ability to edit the header, so I'm guessing this is something you have to do. The code to add is: <script async src="https://widgets.givebutter.com/latest.umd.cjs?acct=rr1fYlKKbeIogXUq&p=other" ></script> Edit: Our coffers are running pretty dry right now and we need to do some emergency fundraising, so this is highest priority for us right now. Thanks.
mlncn was assigned by joshua_davis 2025-03-25 17:32:15 +00:00
joshua_davis added the
type
Task
label 2025-03-25 17:34:11 +00:00
Owner

@joshua_davis the screenshot does not give the full code, and it is probably not a good idea to try to type it out anyhow!

Could you paste it here?

We could add a module called Header & Footer scripts or this could be approximated with a raw HTML block but if this does not have to be tweaked often this inclusion of third-party assets is something that makes sense as a task for us.

@joshua_davis the screenshot does not give the full code, and it is probably not a good idea to try to type it out anyhow! Could you paste it here? We could add a module called Header & Footer scripts or this could be approximated with a raw HTML block but if this does not have to be tweaked often this inclusion of third-party assets is something that makes sense as a task for us.
Owner

Give Butter's next step, pasting a different sort of script into a page or a block, may require or be made easier by a raw HTML text format— if they show that code feel free to paste that here too.

Thanks!

Give Butter's next step, pasting a different sort of script into a page or a block, may require or be made easier by a raw HTML text format— if they show that code feel free to paste that here too. Thanks!
Author
Owner
<script
  async
  src="https://widgets.givebutter.com/latest.umd.cjs?acct=rr1fYlKKbeIogXUq&p=other"
></script>
``` <script async src="https://widgets.givebutter.com/latest.umd.cjs?acct=rr1fYlKKbeIogXUq&p=other" ></script> ```
Owner

@joshua_davis thank you! I'm including this remote script successfully on the test site but see there's things i was in the middle of that need to be cleaned up or removed before it goes live.

The Givebutter instructions indicate that additional inline scripts need to be added where you want the donation form or other elements. Do you know what else you want? Pasting in scripts is insecure so Drupal will fight you on that but maybe you have already tested that part out?

What we have already added is a large (half megabyte) and presumably privacy-invading script so it would be good to restrict it to the pages where the Givebutter elements are.

Side note: I added the script by making a quick contrib module to do so, so the settings can be updated in the future without need for code or deployment like this:

Screenshot 2025-05-09 at 15-46-31 Givebutter Grassroots Economic Organizing.png

@joshua_davis thank you! I'm including this remote script successfully on the test site but see there's things i was in the middle of that need to be cleaned up or removed before it goes live. The Givebutter instructions indicate that additional inline scripts need to be added where you want the donation form or other elements. Do you know what else you want? Pasting in scripts is insecure so Drupal will fight you on that but maybe you have already tested that part out? What we have already added is a large (half megabyte) and presumably privacy-invading script so it would be good to restrict it to the pages where the Givebutter elements are. Side note: I added the script by making a quick [contrib module](https://www.drupal.org/project/givebutter) to do so, so the settings can be updated in the future without need for code or deployment like this: ![Screenshot 2025-05-09 at 15-46-31 Givebutter Grassroots Economic Organizing.png](/attachments/cd089f49-81fb-460d-92ab-43793fe89f5f)
Owner

Per e-mail: Script will look like: <givebutter-widget id="j2qe2p"></givebutter-widget> so a block that allows full HTML would do it.

Per e-mail: Script will look like: `<givebutter-widget id="j2qe2p"></givebutter-widget>` so a block that allows full HTML would do it.
Author
Owner

I've tried embedding that script on our donation page (which is full html) in exactly the same way I would with a YT video, and it doesn't work.

I've tried embedding that script on our donation page (which is full html) in exactly the same way I would with a YT video, and it doesn't work.
Owner

@joshua_davis Sorry all the above info was for the test site, where the <givebutter-widget id="j2qe2p"></givebutter-widget> but in by editing in 'Source' mode, but however you put it in looked right also, does work:

https://geo-test.drutopia.org/donate

both user/pass in the popup: agaric

However there are also unresolved visual problems from working on #114 so addressing those before deploying to live.

@joshua_davis Sorry all the above info was for the test site, where the `<givebutter-widget id="j2qe2p"></givebutter-widget>` but in by editing in 'Source' mode, but however you put it in looked right also, does work: https://geo-test.drutopia.org/donate both user/pass in the popup: agaric However there are also unresolved visual problems from working on #114 so addressing those before deploying to live.
mlncn added the
status
In Review
label 2025-07-29 19:49:14 +00:00
mlncn removed their assignment 2025-07-29 20:29:41 +00:00
freescholar was assigned by mlncn 2025-07-29 20:30:33 +00:00
joshua_davis was assigned by mlncn 2025-07-29 20:30:41 +00:00
Sign in to join this conversation.
No milestone
No project
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: geo/geo-coop#138
No description provided.