Mate Posted May 12 Share Posted May 12 (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 by Mate edited code for readability Link to comment
Solution paul2009 Posted May 12 Solution Share Posted May 12 (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 by paul2009 gregbarbosa, Anna-I and Mate 2 1 About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
Mate Posted May 12 Author Share Posted May 12 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 Share Posted May 17 (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 by Sharif Link to comment
Anna-I Posted June 1 Share Posted June 1 Following this - any updates on a fix or a new recommended method to measure form submissions? Link to comment
KenWilly Posted June 28 Share Posted June 28 (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 by KenWilly added note about ajax listener creedon 1 Link to comment
kason7 Posted July 7 Share Posted July 7 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 Share Posted July 12 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 Share Posted September 12 I have created a video about this and posted the code on GitHub(https://github.com/sorcamarian/squarespace-tricks/tree/main/Forms) Contact me for development work - I’m a Freelancer Software engineer and architect Squarespace Tutorials for free - YouTube📹 Manage Tasks & Notes Easily Squarespace Custom Web Development & Design 😀 Message me if you need custom features or a new website created 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