Integration
Contact Form 7 tracking for Umami
See every Contact Form 7 message that was sent as an event in Umami, labeled with the form's name. One switch, no code, and nothing typed into the form leaves your site.
Short answer
To track Contact Form 7 in Umami, install Connect for Umami, open Settings → WPUmami → Events and switch on Form submissions. Each time Contact Form 7 reports that a message was sent, the plugin sends a form_submit event to Umami with the form's name, its ID and plugin set to contact-form-7. Validation errors are not counted, and nothing typed into the form is sent.
The Contact Form 7 event sent to Umami
One event, sent once for each message Contact Form 7 reports as sent. It appears in Umami under Events, with the details below attached.
| Event | When it is sent | Data sent with it |
|---|---|---|
form_submit | Contact Form 7 reports that the form's mail was sent, through its wpcf7mailsent event. A submission with validation errors does not send it. |
|
How a sent Contact Form 7 message is detected
Contact Form 7 announces a successful send in the visitor's browser, with an event named wpcf7mailsent. Connect for Umami listens for that event and sends form_submit to Umami. Nothing is added to your forms and no form settings change.
Contact Form 7's event names the form by its ID. The plugin notes each form's title while the page is being built, so the event that reaches Umami carries the name as well as the ID.
A submission that fails validation, or a message that could not be sent, does not produce wpcf7mailsent. Nothing is sent to Umami for it.
The event goes through Umami's own tracker. It lands in the same Umami session as the visit and follows the same rules as your pageviews: Do Not Track, your domains list and the administrator exclusion.
One submission, one event
If the same form reports success twice within three seconds, the second report is ignored, so a single submission is not counted twice.
Which Contact Form 7 situations are covered
| Situation | Tracked | Notes |
|---|---|---|
| Message sent successfully | Yes | Reported when Contact Form 7 fires wpcf7mailsent. |
| Several Contact Form 7 forms on one site | Yes | Each event carries its own form's title and ID. |
| Submission with validation errors | No | By design. Only messages that were sent are counted. |
| Message that could not be sent | No | Contact Form 7 does not report it as sent, so no event is sent. |
| Page where Contact Form 7's JavaScript is not running | No | The plugin relies on Contact Form 7's browser event. See the note below. |
| Logged-in administrators | No | Left out by default. Untick "Exclude logged-in admins" on the Tracking tab to include them. |
How to turn on Contact Form 7 tracking
Connect the site to Umami
In WordPress, go to Settings → WPUmami → Tracking. Paste your Umami website ID and script URL, then save. The status panel at the top should say the tracking script is responding.
Switch on Form submissions
Open the Events tab. Under Forms and comments, tick Form submissions and save. The description under the switch lists the form plugins active on the site, and should include Contact Form 7.
Send a test message
In a private browser window, open a page with one of your forms, fill it in and send it. Use a private window because logged-in administrators are not tracked by default.
Check Umami
In Umami, open your website and look at Events. You should see
form_submit, with the form's title in itsformproperty andcontact-form-7inplugin.
What is not sent
Nothing typed into the form is sent to Umami. That means no names, email addresses, subject lines, messages or any other field value. The event carries three things: the form's title, its ID and the plugin name contact-form-7. Because the title is sent, give your forms titles you are happy to see in your analytics.
The plugin sets no cookies and uses no local or session storage in the visitor's browser to do this.
Questions you can answer once it is on
- Which form gets the most messages, using the
formproperty. - Which referrers and campaigns bring visitors who go on to contact you.
- Which countries and devices messages come from, because the event sits in the same Umami session as the visit.
- How many visitors who reach your contact page go on to send a message, using an Umami funnel that ends in
form_submit.
Frequently asked questions
How do I track Contact Form 7 submissions in Umami?
Install Connect for Umami, enter your Umami website ID and script URL on the Tracking tab, then tick Form submissions on the Events tab. Each message Contact Form 7 sends then appears in Umami as a form_submit event with the form's name and ID.
Can I track Contact Form 7 in Umami without a plugin?
Yes, with code. Add a script to your site that listens for Contact Form 7's wpcf7mailsent event and calls umami.track(). Connect for Umami does that for you and adds the form's name and ID to the event. See the guide to tracking form submissions in Umami.
Are validation errors or failed sends counted?
No. The event is sent only when Contact Form 7 reports that the mail was sent. A submission with validation errors, or a message that could not be sent, is not counted.
Does it send the message or the sender's email address to Umami?
No. Only the form's title, its ID and the plugin name contact-form-7 are sent. Nothing the visitor typed leaves your site.
Can I tell my Contact Form 7 forms apart in Umami?
Yes. Each event carries the form's title in form and its ID in form_id, so every form is counted separately.
Why is my own test message not showing up in Umami?
Logged-in administrators are excluded from tracking by default. Test in a private browser window, or untick "Exclude logged-in admins" on the Tracking tab while you test.
Connect WordPress to Umami in about two minutes
One plugin: the tracking script, events, store revenue and your stats inside WordPress. Plans start at $12 a year, with a 14-day money-back guarantee.