Skip to main content
Contact Form 7 → TikTokIntegration guide

Connecting Contact Form 7 to TikTok Events API

Contact Form 7 is free, everywhere, and stores nothing by default — which is the whole problem. TikTok's audience skews to exactly the browsers and app contexts where browser-side tracking performs worst. The join between them succeeds or fails on one thing: whether the ttclid reaches the Contact Form 7 submission before the conversion happens, because TikTok can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Contact Form 7 to TikTok: SubmitForm with ttclid from the webview

To send Contact Form 7 leads to TikTok, read ttclid on page load inside TikTok's in-app browser, set a first-party cookie, and copy it into a hidden field. Send SubmitForm from the wpcf7_mail_sent hook with hashed email and phone, sharing an event_id with any pixel event. Store entries first so TikTok's lead count can be checked.

TikTok's standard event for this is SubmitForm. The catch is that CF7 forms on TikTok traffic are filled inside TikTok's in-app browser, and the ttclid that was on the landing URL is not reliably in a cookie by the time the visitor scrolls down and submits. Read it on page load, set a first-party cookie, and copy it into a CF7 hidden field with JavaScript so it travels in the posted data instead of depending on webview storage.

When the form is submitted, send SubmitForm from the wpcf7_mail_sent hook with hashed email and phone, which are TikTok's fallback match, plus the ttclid if present. If you also fire the TikTok pixel on the wpcf7mailsent DOM event, both sides need the same event_id, passed through a hidden field the same way; otherwise TikTok counts the lead twice.

Because CF7 stores nothing by default, add an entries plugin or table before any of this. Without stored submissions there is no list to compare TikTok's lead count against, and in-app browser leads are the ones most likely to be missing from it. Once entries are stored, compare submission rate for TikTok in-app traffic against regular mobile browsers: a much lower rate is a form problem in the webview, not a tracking gap.

Contact Form 7 → TikTok · what breaks

Why this join usually fails — Contact Form 7 → TikTok

  1. 01

    The ttclid never reaches Contact Form 7

    There is no entries table to write to, so the identifier has to be captured into a hidden field and persisted by whatever you add for storage. Contact Form 7 submits over AJAX, so the page does not reload and anything expecting a navigation event never fires.

  2. 02

    AJAX submission means no page load to hook

    Setups that fire a conversion on thank-you-page load simply never fire. Setups that listen for the DOM event miss anyone whose script execution was blocked or deferred.

  3. 03

    The ttclid is lost in the in-app browser

    TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.

  4. 04

    Nothing reconciles afterwards

    TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.

Contact Form 7 → TikTok · the fix

What working looks like — Contact Form 7 → TikTok

  • The ttclid on every submission

  • Conversions arriving in TikTok

    Events appear in TikTok Events Manager, deduplicated against the pixel, and become usable for optimization.

  • Reconciled against the source

Contact Form 7 → TikTok · architecture

How Contact Form 7 and TikTok actually connect

  1. 1

    Contact Form 7 holds the truth

    Out of the box Contact Form 7 emails the submission and keeps no record. Before any attribution work is meaningful, submissions have to be stored somewhere queryable. That is step one and it is not optional.

  2. 2

    TikTok Events API needs a click to match

    TikTok matches server events using ttclid where available, falling back to hashed contact information. Both should be sent — the fallback is what carries the events where the click ID did not survive.

  3. 3

    The identifier is the bridge

    The ttclid, captured at the visit and carried into the Contact Form 7 submission.

  4. 4

    The event source decides reliability

    Fire server-side from PHP. The browser-side wpcf7mailsent DOM event exists and is commonly used, but it depends on the visitor's browser executing correctly and on the AJAX response arriving — the server hook does not.

  5. 5

    Deduplication at the destination

    TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.

Contact Form 7 → TikTok · normal or broken

Working vs. broken, side by side — Contact Form 7 → TikTok

Normal, not a fault

  • The ttclid present on the submission

  • Sent from the wpcf7_mail_sent hook

  • Deduplicated correctly

    TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.

  • Reconciles with the source

Actually broken

  • The ttclid missing on most records

    There is no entries table to write to, so the identifier has to be captured into a hidden field and persisted by whatever you add for storage. Contact Form 7 submits over AJAX, so the page does not reload and anything expecting a navigation event never fires.

  • Sent from the browser

    Setups that fire a conversion on thank-you-page load simply never fire. Setups that listen for the DOM event miss anyone whose script execution was blocked or deferred.

  • Counted twice, or not at all

    TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.

  • Nobody has reconciled it

Contact Form 7 → TikTok · diagnose

Diagnostic order — Contact Form 7 → TikTok

  1. 01

    Count submissions carrying the ttclid

  2. 02

    Follow one real conversion end to end

  3. 03

    Confirm submissions are being stored at all

    If the only record is an email inbox, there is nothing to reconcile and no way to prove any number. Fix storage before touching attribution.

  4. 04

    Measure ttclid capture rate on TikTok traffic specifically

    Not on all traffic. TikTok's in-app browser is the failure case, so a healthy overall capture rate can hide a poor one on exactly the traffic that matters.

  5. 05

    Read the match rate, not the success message

    TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.

Contact Form 7 → TikTok · prove

How it gets proven — Contact Form 7 → TikTok

Source of truth

Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.

  • The ttclid confirmed present on a live submission.
  • Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
  • Stored submissions confirmed to match the email record for the same period, before any attribution claim is made.

Contact Form 7 → TikTok · free audit

What we check in the free audit

  • Count submissions carrying the ttclid
  • Follow one real conversion end to end
  • Confirm submissions are being stored at all
  • Measure ttclid capture rate on TikTok traffic specifically
  • Read the match rate, not the success message

Checked against

Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.

Get my free conversion tracking audit

Free30 minutesNo obligation

Contact Form 7 → TikTok · when not to buy

When you don't need this — Contact Form 7 → TikTok

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the ttclid.
  • If you are on Contact Form 7 and serious about attribution, moving to a form plugin that stores entries is often cheaper than working around the one that does not. We will say so rather than bill for the workaround.
  • If TikTok is a small share of spend, the effort is hard to justify. It pays when TikTok is a channel you are actively scaling.

Contact Form 7 → TikTok · what we deliver

What gets built — Contact Form 7 → TikTok

  • Identifier capture into Contact Form 7

    Hidden field populated from a first-party cookie, plus a storage layer so the submission and its identifier survive past the email. The wpcf7_before_send_mail hook is where both happen.

  • Event source: the wpcf7_mail_sent hook

    Fire server-side from PHP. The browser-side wpcf7mailsent DOM event exists and is commonly used, but it depends on the visitor's browser executing correctly and on the AJAX response arriving — the server hook does not.

  • Dispatch to TikTok

    Server events to the TikTok Events API with the ttclid, hashed contact information and a matching event_id.

  • Reversals where they exist

    Nothing to reverse. Spam filtering before the send is the equivalent concern.

Written guarantee

95%+ tracking accuracy

Measured against Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Contact Form 7 → TikTok questions, answered

Fire SubmitForm in the browser on the wpcf7mailsent event and server-side from the wpcf7_mail_sent hook, with the same event_id on both. Include hashed email and phone so matching works when the ttclid was lost.

Free · 30 min

Get Contact Form 7 and TikTok joined properly

Free30 minutesNo obligation