Skip to main content
Contact Form 7 → Microsoft AdsIntegration guide

Connecting Contact Form 7 to Microsoft Ads

Contact Form 7 is free, everywhere, and stores nothing by default — which is the whole problem. Microsoft Ads reaches an older, higher-income, more desktop-weighted audience than Google, and it is routinely the cheapest qualified traffic a B2B advertiser can buy. The join between them succeeds or fails on one thing: whether the MSCLKID reaches the Contact Form 7 submission before the conversion happens, because Microsoft Ads 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 Microsoft Ads: MSCLKID into a hidden field

To send Contact Form 7 leads to Microsoft Ads, store the MSCLKID with each submission through a hidden field, filled from the URL or the UET auto-tagging cookie. Fire a UET event goal on submit for speed, and upload qualified leads to a separate offline conversion goal on a schedule from stored entries, never from the notification email.

Microsoft offline conversions need the MSCLKID on the stored submission. In Contact Form 7, [hidden msclkid default:get] fills the field from the URL, which only works when the form sits on the landing page. For any other page, read the click ID from the first-party cookie UET writes when auto-tagging is on, check that its stored format matches the URL parameter, set the field before submit, and persist it with the entry in whatever storage you add.

Use two goals, not one. A UET event goal on submit gives Microsoft a fast signal; a separate offline conversion goal fed from stored entries carries the leads that actually qualified, with a value if you assign one. Uploading every raw submission to the offline goal as well as firing the UET event counts each lead twice, since different goal names are different conversions to Microsoft.

The break specific to this pairing is time. Contact Form 7 sites are often small service businesses where a lead is qualified by phone days later, and the upload happens whenever someone remembers. Upload on a schedule, inside the click window you confirmed in the account, from the stored entry and its MSCLKID, never from the notification email, which carries no click ID unless you add the field to the mail template.

Contact Form 7 → Microsoft Ads · what breaks

Why this join usually fails — Contact Form 7 → Microsoft Ads

  1. 01

    The MSCLKID 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

    Auto-tagging switched off

    Microsoft auto-tagging is frequently disabled in accounts that were set up quickly or imported from Google, and without it no MSCLKID arrives at all — so the entire offline import has nothing to match against and fails silently.

  4. 04

    Nothing reconciles afterwards

    Microsoft Ads reports offline conversion uploads with rows accepted and rejected. A successful upload is not a matched conversion — check that conversions actually appear against campaigns afterwards.

Contact Form 7 → Microsoft Ads · the fix

What working looks like — Contact Form 7 → Microsoft Ads

  • The MSCLKID on every submission

  • Conversions arriving in Microsoft Ads

    Conversions appear against the campaign, ad group and keyword that produced the click, with the value you sent, and become usable for automated bidding.

  • Reconciled against the source

Contact Form 7 → Microsoft Ads · architecture

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

    Microsoft Ads needs a click to match

    Microsoft matches uploaded conversions to clicks using the MSCLKID, and the conversion goal must be created as an offline conversion type. The click has to fall inside Microsoft's import window — verify the current limit in your account rather than assuming it matches Google's.

  3. 3

    The identifier is the bridge

    The MSCLKID, 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

    Microsoft deduplicates on the combination of click identifier, conversion name and conversion time. Uploading the same click against a second conversion goal counts twice, which is the usual cause of inflated numbers here.

Contact Form 7 → Microsoft Ads · normal or broken

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

Normal, not a fault

  • The MSCLKID present on the submission

  • Sent from the wpcf7_mail_sent hook

  • Deduplicated correctly

    Microsoft deduplicates on the combination of click identifier, conversion name and conversion time. Uploading the same click against a second conversion goal counts twice, which is the usual cause of inflated numbers here.

  • Reconciles with the source

Actually broken

  • The MSCLKID 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

    Microsoft auto-tagging is frequently disabled in accounts that were set up quickly or imported from Google, and without it no MSCLKID arrives at all — so the entire offline import has nothing to match against and fails silently.

  • Nobody has reconciled it

Contact Form 7 → Microsoft Ads · diagnose

Diagnostic order — Contact Form 7 → Microsoft Ads

  1. 01

    Count submissions carrying the MSCLKID

  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

    Confirm auto-tagging is enabled and check the upload diagnostics

    One account setting decides whether any of this works. Then read the per-row errors on the upload rather than the success count.

  5. 05

    Read the match rate, not the success message

    Microsoft Ads reports offline conversion uploads with rows accepted and rejected. A successful upload is not a matched conversion — check that conversions actually appear against campaigns afterwards.

Contact Form 7 → Microsoft Ads · prove

How it gets proven — Contact Form 7 → Microsoft Ads

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 MSCLKID confirmed present on a live submission.
  • Auto-tagging confirmed on, and the accepted count reconciled against conversions appearing in campaign reporting.
  • Stored submissions confirmed to match the email record for the same period, before any attribution claim is made.

Contact Form 7 → Microsoft Ads · free audit

What we check in the free audit

  • Count submissions carrying the MSCLKID
  • Follow one real conversion end to end
  • Confirm submissions are being stored at all
  • Confirm auto-tagging is enabled and check the upload diagnostics
  • 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 → Microsoft Ads · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the MSCLKID.
  • 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 are not running Microsoft Ads at meaningful spend, skip it — though for B2B the traffic is often cheaper and better qualified than people expect, which is worth testing before dismissing.

Contact Form 7 → Microsoft Ads · what we deliver

What gets built — Contact Form 7 → Microsoft Ads

  • 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 Microsoft Ads

    Offline conversion import through the Microsoft Advertising API or a scheduled upload.

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

Add a hidden form-tag for msclkid, fill it from the URL or the UET cookie, and store it with the submission, since Contact Form 7 keeps no entries by default.

Free · 30 min

Get Contact Form 7 and Microsoft Ads joined properly

Free30 minutesNo obligation