Mate Posted May 12, 2023 Share Posted May 12, 2023 (edited) Hi, We've been measuring our form submissions through Google Tag Manager. We did this by adding an event in JS in the Post-submit HTML like this: <script> window.dataLayer = window.dataLayer || []; window.dataLayer.push({'event':'leadform_submission'}); </script> This method suddenly stopped working and can't find the reason. It's not a GTM issue, I've tested a simple JS like this: <script> alert("thanks"); </script> and it won't run either. What could cause JS not to run in this section anymore? Thanks Edited May 12, 2023 by Mate edited code for readability Link to comment
Solution paul2009 Posted May 12, 2023 Solution Share Posted May 12, 2023 (edited) 9 minutes ago, Mate said: What could cause JS not to run in [the Post-submit HTML] section anymore? @Mate Squarespace just rolled out a new, international-friendly Form Block. It has replaced the old Form Block on all Squarespace 7.0 and 7.1 sites. With this new Form Block, Post-submit HTML no longer supports scripts (the content in script tags is ignored). You can raise this with the Internationalization team as a feature request by raising a support ticket with Squarespace Customer Care. Did this help? Please give feedback by clicking an icon below ⬇️ Edited May 12, 2023 by paul2009 Anna-I, Mate and gregbarbosa 2 1 About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links. Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional. Link to comment
Mate Posted May 12, 2023 Author Share Posted May 12, 2023 Thanks, Paul, that's a tremendous help, at least I know now where the problem is coming from! Is there a new, recommended way to measure form submissions, or it is just not supported anymore and that's that? Link to comment
Sharif Posted May 17, 2023 Share Posted May 17, 2023 (edited) On 5/12/2023 at 9:34 AM, Mate said: Thanks, Paul, that's a tremendous help, at least I know now where the problem is coming from! Is there a new, recommended way to measure form submissions, or it is just not supported anymore and that's that? I am in the exact same boat, I thought I was going crazy for a little bit. Did you figure out a solution to that? I am about to try putting it in the footer . Edit I ended up redirecting to a thank you page Edited May 17, 2023 by Sharif Link to comment
Anna-I Posted June 1, 2023 Share Posted June 1, 2023 Following this - any updates on a fix or a new recommended method to measure form submissions? Link to comment
KenWilly Posted June 28, 2023 Share Posted June 28, 2023 (edited) No solution yet, but I did confirm that the new international-friendly form block also breaks Zapier integrations if you are passing hidden fields. It is possible to detect the events with an ajax listener, but that seems fragile and likely to break with a later deployment. Seems like something they should have tested... Edited June 28, 2023 by KenWilly added note about ajax listener creedon 1 Link to comment
kason7 Posted July 7, 2023 Share Posted July 7, 2023 I (was) using it for passing user-provided data for enhanced conversions tracking in Google Ads, this is now broken as I had to revert to redirect and track a thank-you page. Squarespace should prioritize this and make an urgent hot fix in my opinion, it is a bit embarrassing. Link to comment
Grahammer Posted July 12, 2023 Share Posted July 12, 2023 Our form submissions have also been breaking. We've lost many potential customers and now we have to redo our forms, and upgrade to "business" just to add web leads into Salesforce. There was no warning of this change. Squarespace customer support was also unable to give us direction on what had happened. sorca_marian 1 Link to comment
sorca_marian Posted September 12, 2023 Share Posted September 12, 2023 I have created a video about this and posted the code on GitHub(https://github.com/sorcamarian/squarespace-tricks/tree/main/Forms) colin.irwin 1 👨🔧👨💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment