How to track leads in WooCommerce
A lead is a claim about intent, and claims need validation. Half of all form submissions in paid-traffic funnels are bot noise, typo emails, or duplicates — and each one that gets attributed inflates a campaign's apparent performance.
Client event (fast, blockable) + server event (authoritative) → collapsed on the submission id
Send it twice, on purpose. The client event tells you what the person did and when; the server event confirms it happened and carries the context the browser never had. A shared the submission id collapses the two into one record marked confirmed by both sides.
Never send only the client event for anything with money attached — ad blockers see roughly 20–30% of paid-traffic sessions.
The server-side event
This is the one that has to be right. It runs on your infrastructure, so no ad blocker, browser policy or network condition can stop it.
// Contact Form 7 / Gravity Forms — confirmed submission only
add_action('wpcf7_mail_sent', function ($form) {
$data = WPCF7_Submission::get_instance()->get_posted_data();
flowsk_server_event([
'name' => 'lead_captured',
'category' => 'identification',
'anonymous_id' => $_COOKIE['_fsk_id'] ?? null,
'email' => $data['your-email'],
'source' => 'server',
]);
});
What goes wrong
Three mistakes account for nearly every broken leads implementation we see.
Counting the form render or focus as a lead instead of the confirmed submission.
No bot filtering, so a scraper's submissions get credited to whichever campaign it landed from.
Losing the campaign context because the form is in a third-party iframe that cannot see your visitor id.
Frequently asked questions
Should I track leads client-side or server-side?
Both. The client event captures behaviour in real time and is cheap; the server event is authoritative and cannot be blocked. Give them a shared de-duplication key (the submission id) and they collapse into one confirmed record instead of double counting.
What is the de-duplication key for leads in WooCommerce?
The submission id — a value both sides already know. That is the whole requirement: the browser and your backend must be able to derive the same string independently.
What goes wrong most often?
Counting the form render or focus as a lead instead of the confirmed submission.
Why does the server event matter more here?
A lead is a claim about intent, and claims need validation. Half of all form submissions in paid-traffic funnels are bot noise, typo emails, or duplicates — and each one that gets attributed inflates a campaign's apparent performance.
Related guides
See the receipt for every conversion.
Flowsk Signals stitches the anonymous click to the email to the purchase — first-party, server-side, de-duplicated on a key you choose. One snippet, $29/mo, and a journey you can inspect event by event.
More free tools
Same deal — instant, no signup.