Skip to main content
Contact Form 7 → BigQueryIntegration guide

Connecting Contact Form 7 to BigQuery

Contact Form 7 is free, everywhere, and stores nothing by default — which is the whole problem. BigQuery has no attribution model, no deduplication rules and no opinion about your data — which makes it the only destination on this site where every number is exactly as good as the query that produced it. The join between them succeeds or fails on one thing: whether whatever join key you decide on reaches the Contact Form 7 submission before the conversion happens, because BigQuery 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 BigQuery: the entries table CF7 never had

BigQuery can be the storage Contact Form 7 lacks. Write each submission from the wpcf7_before_send_mail hook with a generated submission ID, form ID, UTC timestamp, landing URL, hidden-field click IDs and consent state, keeping personal fields in a separate restricted table. Flag spam later rather than deleting, and store the submission ID on CRM records.

For Contact Form 7, BigQuery can be the storage layer the plugin is missing rather than an extra copy of one. Instead of installing an entries plugin and then exporting from it, write each submission straight to a table from the wpcf7_before_send_mail hook: a generated submission ID, form ID, timestamp in UTC, the landing URL, and every click identifier you captured into hidden fields (gclid, fbclid, rdt_cid, utm values) plus the consent state at submit time.

Keep personal fields in a separate table with tighter access, keyed by the same submission ID. Most of the analysis you want, leads by campaign by week, never needs the name or message, and a contact box collects things people should not have typed into it. A second advantage of owning the row: spam that Contact Form 7's own filtering let through can be flagged later with a boolean, rather than silently deleted and making last month's lead count change.

The join key for everything downstream is that submission ID. When a lead becomes a customer in your CRM, store the submission ID on the CRM record, and BigQuery can tie revenue back to the original click without any ad platform's window deciding the answer. Do the warehouse load from PHP, not the browser DOM event, or blocked scripts create missing rows you cannot detect.

Contact Form 7 → BigQuery · what breaks

Why this join usually fails — Contact Form 7 → BigQuery

  1. 01

    Whatever join key you decide on 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 warehouse quietly disagreeing with every platform

    This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.

  4. 04

    Nothing reconciles afterwards

    BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.

Contact Form 7 → BigQuery · the fix

What working looks like — Contact Form 7 → BigQuery

  • Whatever join key you decide on on every submission

  • Conversions arriving in BigQuery

    The row lands in a table you own, joinable to every other table you own, with no window and no expiry.

  • Reconciled against the source

Contact Form 7 → BigQuery · architecture

How Contact Form 7 and BigQuery 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

    BigQuery needs a click to match

    BigQuery needs a schema and consistent types. The failure mode is not rejection, it is silent divergence: a column that arrives as a string in one load and an integer in the next, or a timestamp in the wrong zone, which produces answers that look plausible and are not.

  3. 3

    The identifier is the bridge

    Whatever join key you decide on, 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

    Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.

Contact Form 7 → BigQuery · normal or broken

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

Normal, not a fault

  • Whatever join key you decide on present on the submission

  • Sent from the wpcf7_mail_sent hook

  • Deduplicated correctly

    Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.

  • Reconciles with the source

Actually broken

  • Whatever join key you decide on 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

    This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.

  • Nobody has reconciled it

Contact Form 7 → BigQuery · diagnose

Diagnostic order — Contact Form 7 → BigQuery

  1. 01

    Count submissions carrying whatever join key you decide on

  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

    Reconcile warehouse order counts against each platform for one closed window

    The gaps localize the problem: a gap against all platforms is a collection issue, a gap against one is that platform's window or matching.

  5. 05

    Read the match rate, not the success message

    BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.

Contact Form 7 → BigQuery · prove

How it gets proven — Contact Form 7 → BigQuery

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.

  • Whatever join key you decide on confirmed present on a live submission.
  • Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
  • Stored submissions confirmed to match the email record for the same period, before any attribution claim is made.

Contact Form 7 → BigQuery · free audit

What we check in the free audit

  • Count submissions carrying whatever join key you decide on
  • Follow one real conversion end to end
  • Confirm submissions are being stored at all
  • Reconcile warehouse order counts against each platform for one closed window
  • 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 → BigQuery · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry whatever join key you decide on.
  • 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 you have one store and one ad platform, a warehouse is infrastructure you will maintain for a reconciliation you could do in a spreadsheet.

Contact Form 7 → BigQuery · what we deliver

What gets built — Contact Form 7 → BigQuery

  • 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 BigQuery

    Streaming inserts or scheduled batch loads from your order system, with the raw event retained alongside whatever you derive from it.

  • 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 → BigQuery questions, answered

Yes, by writing rows server-side from a Contact Form 7 hook such as wpcf7_before_send_mail. Contact Form 7 keeps nothing by default, so the warehouse table can serve as the submission store itself.

Free · 30 min

Get Contact Form 7 and BigQuery joined properly

Free30 minutesNo obligation