Track Squarespace form submissions with Google Tag Manager (and Google Analytics)
www.squarespace.com is one of the leading website builders. Surprisingly, it’s not that easy to integrate it with Google Tag Manager. It’s still easy to do code injections in order to add GTM codes to a website. However, you need some creativity for such essential things as tracking Squarespace form submissions with GTM. I’ve recently solved this task for my client and he shared the idea of making a How-To guide on it because neither he or I could find any information about it, except for some real coding stuff with extra pieces of code injections. I’m happy to share my solution, which doesn’t require any advanced skills.
So, the difficulties of tracking a Squarespace website form submission with Google tag Manager are, as follows:
- URL doesn’t change after a form is submitted
- Squarespace form widget doesn’t send any event we can easily catch with Google Tag Manager
- HTML elements of a Squarespace form sometimes have dynamic IDs, so it’s tricky to catch them with ID via GTM triggers
- It’s not 100% correct to track just a click of form submit button, as it will count each click, regardless if users fill in form fields with mistakes and/or don’t finish it
The solution is to make a GTM trigger, that fires when a Squarespace element becomes visible. It is about the <div> element with ‘thank you page’ text, that becomes visible after a form was successfully(!) submitted. Here is a real example of what this looks like:
The parameters may vary, but the idea is pretty simple, isn’t it? Use CSS Selector of the <div> ‘thank you’ element. You can find it by looking at the text string code via Google Chrome.
This is it. It is that easy. Now use this GTM trigger for firing your Google Analytics, or any other GTM tag. I’m going to create a video guide for this, as well. Anyway, if you need help, ask me and I’ll be happy to assist.
I’m Dan Burykin, the Free Call Tracking creator and a top-rated marketer. Together we are Top-Rated Team — an international group of independent Google Ads and MarTech pro. Each of us has been setting up and optimizing paid traffic for eCommerce, B2B and B2C lead generation in the United States, Canada, UK, Germany and Ukraine for over 10 years.
- Upwork references of Dan’s Google Ads projects (active ones aren’t seen from web): top-rated.team/dan — top 10% Upwork experts, 100% job success
- Upwork references of Dan’s expert group projects (active ones aren’t seen from web): upwork.com/ag/google/ (top-rated.team/upwork) — top 10% Upwork agencies
- Video from the Google Lisbon project: youtu.be/OP_EiErIUxY
- LinkedIn recommendations: linkedin.com/in/burykin/
- Manual(!) Google Ads audit: audit.top-rated.team
- Some detailed cases are below (top-rated.team/cases)