Learn-to-send-email-via-google-script-html-no-server: Ad blocked (Ghostery) prevent run onreadystatechange event

Created on 30 Jul 2020  路  10Comments  路  Source: dwyl/learn-to-send-email-via-google-script-html-no-server

Hi,
everything work as expected.

But in Chrome, when I have Ghostery extension enabled, xhr.onreadystatechange event is not firing.
Do you have any recommendation how to solve this?

Thanks

external-dependency

Most helpful comment

I鈥檝e used both AdBlockPlus and uBlockOrigin & never had an issue with using this tutorial, so I don鈥檛 think it鈥檚 all ad blockers but specific to Ghostery.

All 10 comments

Here is screen from network panel:
image

@illycz this is really an issue with Ghostery blanket blocking requests to Google domains.
The script action for the form is https://script.google.com and Ghostery is blocking it.
Please open an issue on Ghostery or use a different Ad blocking plugin.

@nelsonic thanks for fast reply. Is there another frontend solution which prevent this?

@illycz what problem are you trying to solve? Are you using the form to collect data or do you want to send email? or _both_?

@nelsonic both. sending and collecting working as expected. The only problem is UX after sending form, because for example within Ghostery enabled, the submit button is still disabled and I don't get any success message.

Hmm ... sadly I don't think there is an easy way around this. 馃槥
You could spin up a free Heroku Instance to proxy the request, but it might be a bit more effort than you were expecting.
Maybe look into using Typeform: https://help.typeform.com/hc/en-us/articles/360032972852-Free-plan 馃挱
They will let you have a form on your page, submit the data to Google Sheets and send yourself an email.
If you have fewer than 100 submissions per month, it's free.

@nelsonic thanks, I understand that the problem is related to adblockers.

I鈥檝e used both AdBlockPlus and uBlockOrigin & never had an issue with using this tutorial, so I don鈥檛 think it鈥檚 all ad blockers but specific to Ghostery.

I also downloaded Ghostery for Firefox, and the base settings still let me submit the demo form we have here & the button was disabled after clicking submit and then the thank-you div appeared over the form after a successful submission.
https://dwyl.github.io/learn-to-send-email-via-google-script-html-no-server/

@mckennapsean thanks for your effort. I tried default Ghostery settings in Chrome, still without success :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Herbert2122 picture Herbert2122  路  4Comments

eleosa picture eleosa  路  4Comments

ryanlao picture ryanlao  路  3Comments

Brothman picture Brothman  路  3Comments

jchesner picture jchesner  路  3Comments