Custom Tracking Provider Contact Form Using A Unique Identifier to Separate Lead Capture

Posted by: Nico Cagalitan Date Posted: June 26, 2025
Back to Case Studies

Issue

The issue is that they have a provider contact form to set a schedule or send a message to a therapist, which is used for both instances. The only way to recognize them is through a <p> (paragraph tag element) that has a unique identifier under CSS Selector “.appointment-time-string”, which we used as our target to separate them via a custom code.

Solution

Constructed a custom code that will target “.appointment-time-string”, as an identifier to differentiate between booking a call from the message the therapist form. With that in mind, once the code starts to recognize the form submission, it will determine whether the form has the class “.appointment-time-string” or not. If it does, it will then pass between the two unique form IDs that we have set, “book-a-meeting” or “contact-a-therapist”.

Achievement

We develop a code and track the form separately by using the outside form CSS class selector that is only present within the book a call with the provider form modal.

Snippet/Screenshot/Link

Ticket: link

Code: screenshot