GravityForm not redirecting to Thank You page
-
Hi,
After installing AO, a user gets a thank you message where the form used to be. Before AO, the user would be redirected to a thank you page after submitting a form on GravityForms (GF). I need the user to redirect to a thank you page because we track that as a GOAL in Google Analytics.
IMPORTANT: This issue only applies to the top form on the homepage.
Do you know what script I should exclude so that GF will redirect the user to a thank you page?
UPDATE: the form works as intended if I uncheck: ”
Optimize JavaScript Code?” – but unchecking negatively impacts my Google Page Speed score.Thanks.
-
This topic was modified 4 years, 1 month ago by
mhern2014.
-
This topic was modified 4 years, 1 month ago by
mhern2014.
-
This topic was modified 4 years, 1 month ago by
mhern2014.
The page I need help with: [log in to see the link]
-
This topic was modified 4 years, 1 month ago by
-
Can you try adding plugins/gravityforms/ to the comma-separated JS optimization exclusion list? If that does not work, can you check the browser console for JS errors and copy/past them here?
frank
Hi Frank,
Thank you! So it works if I do what you said.
But on further testing, what’s really killing the Google Page Speed are these files: js/jquery/jquery.js, js/jquery/jquery.min.js
When I remove the from the “excluded” list, the score improve A LOT. But I then get an error on the contact form:
ERROR: The reCAPTCHA was invalid. Go back and try it again.
Is there a way to exclude the Google Recaptcha script? I tried excluding: recaptcha/api.js, but that didn’t work.
Here’s the code you requested:
autoptimize_22652d50ced40bdad5d5e2fb31580597.js:7163 Uncaught TypeError: jQuery(...).slick is not a function at HTMLDocument.<anonymous> (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:7163) at mightThrow (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467) at process (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2504) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:7163 mightThrow @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2504 setTimeout (async) jQuery.readyException @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2630 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2639 mightThrow @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2504 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2525 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2382 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2515 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2525 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2382 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 ready @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2654 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2665 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:26 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:28 autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2631 Uncaught TypeError: jQuery(...).mask is not a function at HTMLDocument.<anonymous> ((index):50) at HTMLDocument.dispatch (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484) at HTMLDocument.elemData.handle (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3353) at Object.trigger (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5735) at HTMLDocument.<anonymous> (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5787) at Function.each (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:224) at jQuery.fn.init.each (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:107) at jQuery.fn.init.trigger (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5786) at HTMLDocument.<anonymous> ((index):50) at mightThrow (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467) (anonymous) @ (index):50 dispatch @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484 elemData.handle @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3353 trigger @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5735 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5787 each @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:224 each @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:107 trigger @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5786 (anonymous) @ (index):50 mightThrow @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2504 setTimeout (async) jQuery.readyException @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2630 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2639 mightThrow @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2504 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2525 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2382 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2515 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2525 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2382 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 ready @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2654 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2665 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:26 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:28 autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2631 Uncaught TypeError: jQuery(...).mask is not a function at HTMLDocument.<anonymous> ((index):52) at HTMLDocument.dispatch (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484) at HTMLDocument.elemData.handle (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3353) at Object.trigger (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5735) at HTMLDocument.<anonymous> (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5787) at Function.each (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:224) at jQuery.fn.init.each (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:107) at jQuery.fn.init.trigger (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5786) at HTMLDocument.<anonymous> ((index):52) at mightThrow (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467) (anonymous) @ (index):52 dispatch @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484 elemData.handle @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3353 trigger @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5735 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5787 each @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:224 each @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:107 trigger @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5786 (anonymous) @ (index):52 mightThrow @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2504 setTimeout (async) jQuery.readyException @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2630 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2639 mightThrow @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2467 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2504 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2525 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2382 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 process @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2515 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2525 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2382 fire @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2286 fireWith @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2376 ready @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2654 setTimeout (async) (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:2665 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:26 (anonymous) @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:28 (index):1 The resource https://gjrjq3j98go13bo974bsb5tm-wpengine.netdna-ssl.com/wp-content/themes/roman-gaynor-theme/css-imports/slick-slider/fonts/slick.woff was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally. gravityforms.min.js?ver=2.4.22:1 Uncaught TypeError: Cannot read property 'applyFilters' of undefined at gformAddSpinner (gravityforms.min.js?ver=2.4.22:1) at HTMLFormElement.<anonymous> (gravityforms.min.js?ver=2.4.22:1) at HTMLFormElement.dispatch (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484) at HTMLFormElement.elemData.handle (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3353) gformAddSpinner @ gravityforms.min.js?ver=2.4.22:1 (anonymous) @ gravityforms.min.js?ver=2.4.22:1 dispatch @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484 elemData.handle @ autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3353 (index):50 Uncaught TypeError: jQuery(...).mask is not a function at HTMLDocument.<anonymous> ((index):50) at HTMLDocument.dispatch (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484) at HTMLDocument.elemData.handle (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3353) at Object.trigger (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5735) at HTMLDocument.<anonymous> (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5787) at Function.each (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:224) at jQuery.fn.init.each (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:107) at jQuery.fn.init.trigger (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:5786) at HTMLIFrameElement.<anonymous> ((index):39) at HTMLIFrameElement.dispatch (autoptimize_22652d50ced40bdad5d5e2fb31580597.js:3484)
The problem is you have JS (recaptcha, maybe more) that expects jQuery being available early, which it _has_ to be excluded from JS optimization. The only way to fix that is not using plugins that have (inline) JS that needs jQuery I’m afraid ..
- The topic ‘GravityForm not redirecting to Thank You page’ is closed to new replies.