Shout for Good donate button & lightbox

Hi all,

Our charity (Australia) uses a donation platform called Shout For Good. They have provided instructions on how to integrate the Shout donation button onto our site via a lightbox, but I’m having issues to get it to work and they referred me to asking Wix.

The instructions we have are:

Add Client-side Script to the event/charity site

I’ve created shout.js with that code.

Render the Donate Button

(I have edited the button ID to be my-button)

document.querySelector(‘#my-button’).addEventListener(‘click’, function () {
ShoutLightbox.renderTo(window.parent, {
// a must-have token to generate the Shout Button lightbox
client_token: ‘TOKEN’,
onComplete: function (response) {
// Handle the response here, when the Shout Button returns success/failure response
onCancel: function (response) {
// Handle the cancel response here
onError: function (reponse) {
// Handle the error here, when it fails to render the Shout Button lightbox

I’m receiving the error message
ReferenceError: document is not defined

referencing line

document.querySelector(‘#my-button’).addEventListener(‘click’, function () {

(If anyone can help, I would be incredibly grateful - I am so sleep deprived there are no words, and my brain turns to white fuzz when I’m looking at this.)

Never show your Token!

omg sorry yes.

See… sleep deprived O_O

Fixed now.