We have an embedded form from Typeform on a page of our site. We would like to track a goal when a user clicks the ‘Submit’ button at the end of the form. Although I’ve searched for instructions and found some (even some AI help), it’s a bit beyond our skill level. Wondering if someone could walk us through the steps in detail.
Certainly! I’d be happy to walk you through the steps to track a goal when a user clicks the ‘Submit’ button on a Typeform embedded form on your website. Here’s a detailed guide:
Step 1: Set up Google Analytics
- Sign in to your Google Analytics account (or create a new one) at https://analytics.google.com.
- Create a new property for your website and obtain the tracking code snippet.
Step 2: Identify the ‘Submit’ button
- Open the webpage where the Typeform embedded form is placed in your preferred code editor or content management system (CMS).
- Locate the ‘Submit’ button HTML element within the Typeform embedded form code. It will likely have an HTML tag such as
<input> with a relevant identifier or class name.
Step 3: Modify the ‘Submit’ button
- Add an event tracking code to the ‘Submit’ button element. Modify the button’s HTML by adding an
onclick event attribute to trigger the tracking. For example:
<button onclick="ga('send', 'event', 'Typeform', 'Submit', 'Form Submission');">Submit</button>
Step 4: Insert the Google Analytics tracking code
- Paste the Google Analytics tracking code snippet obtained in Step 1 into the
<head> section of your webpage. It should be placed above the closing
Step 5: Test and verify
- Save the modified webpage and load it in your web browser.
- Complete the form and click the ‘Submit’ button.
- Open Google Analytics and navigate to the Real-Time section to check if the event is being tracked. Look for the event category ‘Typeform’ and the action ‘Submit’ in the Real-Time Events report.
By following these steps, you should be able to track a goal when a user clicks the ‘Submit’ button on your Typeform embedded form using Google Analytics. Remember to customize the event category, action, and label according to your specific tracking needs.
If you encounter any issues or require further assistance, feel free to ask for help.
Wondering why I have to use GA to set this up?
Also - this form is embedded from Typeform, not sure that I could modify the HTML