How to measure contact requests, newsletter signups, and leads.
Forms are often the most important conversion point of a website. Whether newsletter, contact request, or lead gen – you want to know how often they are filled out.
The most reliable way to measure a successful submission is redirection to a separate confirmation page (e.g., /thank-you or /success).Why is this better?
You only measure real submissions (no validation errors).
There are no technical issues with page reloading.
1
Setup Redirection
Configure your form plugin or CMS so that the user is redirected to /thank-you after submission.
2
Trigger Event
Insert a small script on this thank you page that fires upon loading.
Copy
<script> // Waits until page is loaded window.addEventListener('load', function() { if (window.bchic) { bchic.track( 'form_submit_success', { form_id: 'contact_page' });}});</script>
If you don’t have a thank you page or the form is sent via AJAX (without reloading), you can tag the submit element directly.Simply add the data-bchic-event attribute to your submit button.
Copy
<form action="/submit" method="POST"> <input type="email" name="email" placeholder="Your Email" /> <!-- Tracking sits on the button --> <button type="submit" data-bchic-event="newsletter_signup_click"> Sign Up </button></form>
Attention: This tracks the click on the button. It also counts if the user clicks the button but the form is not sent due to missing data (e.g., invalid email).
You might want to know what was selected in the form (e.g., the subject of the request). This is possible, but you must be extremely careful.
Copy
// Track selection in a dropdownconst subject = document.getElementById('subject_select').value;bchic.track('track', 'form_submit', {topic: subject // e.g. "Support" or "Sales"});
Rule: Never send data that could identify a user (email, name, phone, address). Limit yourself to generic selection fields (category, department, product interest).