More in Product analytics
- Autocapture and the AI event inbox
- Build a funnel that explains drop-off
- Identify users across web, app and mini-programs
- What is autocapture, and how does it work?
- How do I review and accept events in the inbox?
- What are unplanned events, and how do I manage them?
- When should I use a funnel instead of a goal or path?
- How do I build a funnel?
- How do I read where a funnel drops off?
- What is identified mode, and should I turn it on?
- How do I call login to identify a user?
- How is one person merged across devices?
- How does identity work on apps and mini-programs?
- How do I track clicks on outbound links?
- How do I track file downloads?
- How do I track custom events?
- How do I track button clicks?
- How do I create a heatmap?
- How do I track scroll depth?
- How do I track ecommerce purchases and revenue?
- How do I set up goals and track conversions?
- How do I query my data with SQL?
- How do I create a custom metric?
- How do I analyze accounts with groups?
- How do I connect AI agents with MCP?
- How do I ask the AI assistant about my data?
- How do I create user segments?
- How do I run an RFM analysis?
- How do I record and watch session replays?
- How do I analyze user paths?
- How do I build a retention report?
- How do I analyze how an event is distributed?
- How do I create a tracking plan?
- How do I view a user’s profile and activity?
- How do I read the lifecycle report (new, returning, resurrecting, dormant)?
- How do I compare attribution models for a conversion?
- All guides in this category
Still have a question?
Could not find it? A person reads every message, usually within a few hours on business days.
Chat with usShort answer
Add data-forms="true" to the TapCub script tag to record every form submit with its id, name and action (never field values). For only successful submissions, use a thank-you page goal or send a custom event when the server accepts the form.
Three ways
| Method | Set-up | Best when |
|---|---|---|
| Form submit event | Add data-forms="true" to the script tag | You want every form counted with no code |
| Thank-you page goal | A page goal on the URL shown after sending | The form redirects to a confirmation page |
| Custom event on success | Call tapcub.track() when the server accepts the form | You need only successful submissions |
Form submit event
Form tracking is off by default. Turn it on by adding data-forms="true" to the script tag:
<script defer src="https://static.pathclue.com/client.js" data-site="YOUR_SITE_KEY" data-forms="true"></script>
Each submit is recorded as a form submit event (__form) with the form's id, name and action. Field values are never stored. Give each form a clear id or name so the rows are readable in Web analyticsEvents.
If you use autocapture, the same switch is also in the autocapture card under Web analyticsConfigurationSDK code.
Thank-you page goal
If the form sends people to a page such as /thanks, create a page goal on that path in Web analyticsGoals. This counts only completed submissions, because people reach the page after the form is accepted.
Custom event on success
A submit event fires when the browser submits, even if the server then rejects the form. To count only accepted forms, send an event in your success handler:
tapcub.track('lead_submitted', { form: 'contact' });
Do not put what people typed, such as names or email addresses, into event properties.
Confirm it works
Do the action yourself on the live site, then open Web analyticsRealtime: the event appears within a few seconds. Totals and properties are in Web analyticsEvents.
See also: form analytics, track button clicks and micro-conversions.
Did this answer your question?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.