SlimStat 6 launchfrom $34.30/yr1 site · 5 sites $83.30 · unlimited sites $139.3030% off every planEnds Nov 16 (UTC)

Configuration

Track Contact Form 7 Submissions in SlimStat

Applies to SlimStat 6.0.0 and SlimStat Pro 3.0.0 · checked

Contact Form 7 sends messages without loading a new page, so there is no pageview for SlimStat to count. Send each successful submission to a confirmation page instead, then count visits to that page with one goal. This works in SlimStat Free.

SlimStat counts the confirmation page visit, not the submission event. The test table below shows what that means in practice.

Before you start

  • A confirmation page with its own URL, such as /inquiry-received/. Publish it as an ordinary WordPress page. Keep names, email addresses and message text out of its URL.
  • SlimStat tracking enabled and recording an eligible visitor. Test in a private window, because your own visits may be excluded, and check your consent setup.

Send successful submissions to that page

Contact Form 7 has no redirect setting. After a message is sent successfully, it fires a wpcf7mailsent event in the browser. A short script can open your confirmation page on that event:

<script>
document.addEventListener('wpcf7mailsent', function () {
  location = '/inquiry-received/';
}, false);
</script>

Add the script to the page that shows the form, for example in a Custom HTML block below the form or with a code snippets plugin. The event does not fire when validation fails or the mail cannot be sent, so those attempts stay on the form. Contact Form 7’s own guide, Redirecting to another URL after submissions, describes the same event.

If the page shows more than one form, the script redirects all of them. To limit it to one form, compare event.detail.contactFormId with that form’s ID.

Create the goal

Open SlimStat → Goals & Funnels and select Add your first goal (or Add goal if you already have one). Name it, for example, Contact Form 7 inquiry. Set Dimension to Page URL, Operator to equals and Value to /inquiry-received/, then select Add goal.

Match the path as it appears in SlimStat’s reports, including the trailing slash. Free allows one active goal. Pro allows five active goals and three funnels. The goal builder guide covers both.

The goal card shows Total, the matching pageviews, and Uniques, the visitors who matched at least once. The goal also counts matching visits from before you created it, so note the starting count before you test.

Test it

Use a date range that includes today, and grant consent in the test browser if your banner asks for it.

TestExpected result
Send a valid submissionThe confirmation page opens. The goal gains one match.
Send an invalid submission, for example with a required field emptyThe form shows an error and stays on the page. The goal does not change, because nothing redirected.
Open /inquiry-received/ directlyThe goal gains one match without any submission. This is the limit of a page-based goal.

Then compare the goal with the messages Contact Form 7 sent (or the entries in a storage add-on, if you use one). The two counts should be close, not identical.

What this does not verify

  • The submission itself. A match means the confirmation page opened. Your form plugin’s entries or emails are the record of what was sent.
  • Spam. A spam submission that passes the form’s checks reaches the page and counts too.
  • Email delivery. A match does not mean the notification email arrived.
  • Refreshes and return visits. Reloading the confirmation page counts again under Total. Read Uniques for the number of visitors.
  • Visitors who are not recorded. Declined consent, exclusion rules and blocked scripts all lower the count.

To check which campaign brought a visitor before the form, see Track your first inquiry.