Connecting Statamic to Microsoft Ads
Statamic is a flat-file CMS on Laravel, usually chosen by agencies for content sites where commerce is bolted on rather than central. 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 Statamic or Laravel order record 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
Statamic static caching and msclkid: capture it in the browser
Copy the msclkid from UET's cookie into a hidden field on the Statamic quote or contact form with a small script, have the Laravel listener write it to the lead or order record, then upload it as an offline conversion import. Check how the static cache handles query strings, confirm auto-tagging is on, and test with caching enabled.
Microsoft's msclkid arrives as a query string, and how Statamic's static cache treats query strings decides what happens next. Depending on configuration, a fully cached site either ignores query strings and serves the same file, which is fine as long as the msclkid is read in the browser, or writes a separate cached file for each unique URL, which grows the cache with every ad click. Check your static caching settings before launch.
The capture itself has to happen in the browser on cached pages: UET stores the msclkid in its own cookie, and a small script copies it into a hidden field on the quote or contact form. The Laravel listener then writes it to the lead or order record with the submission, ready for an offline import against an offline conversion goal.
Statamic sites are often built by an agency and handed over, so the Microsoft account and the site have different owners. The usual failure is that nobody turned on auto-tagging after importing Google campaigns, the hidden field stays empty, and the first sign is an offline upload that matches nothing. Confirm auto-tagging, submit a test lead with full caching on, and check the record holds the msclkid.
Statamic → Microsoft Ads · what breaks
Why this join usually fails — Statamic → Microsoft Ads
- 01
The MSCLKID never reaches Statamic
Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.
- 02
Static caching bypassing PHP entirely
Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.
- 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.
- 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.
Statamic → Microsoft Ads · the fix
What working looks like — Statamic → Microsoft Ads
The MSCLKID on every order
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
Statamic → Microsoft Ads · architecture
How Statamic and Microsoft Ads actually connect
- 1
Statamic holds the truth
Because Statamic sits on Laravel, the commercial record is usually a database table your developers defined. That is the source of truth and it is fully under your control.
- 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
The identifier is the bridge
The MSCLKID, captured at the visit and carried into the Statamic or Laravel order record.
- 4
The event source decides reliability
Fire from the application event. Static caching means the template that rendered the page may never have executed anything.
- 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.
Statamic → Microsoft Ads · normal or broken
Working vs. broken, side by side — Statamic → Microsoft Ads
Normal, not a fault
The MSCLKID present on the order
Sent from your Laravel application's order event
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
Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.
Sent from the browser
Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.
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
Statamic → Microsoft Ads · diagnose
Diagnostic order — Statamic → Microsoft Ads
- 01
Count orders carrying the MSCLKID
- 02
Follow one real conversion end to end
- 03
Check whether full static caching is enabled
If it is, any per-request logic in a template is not running and never was.
- 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.
- 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.
Statamic → Microsoft Ads · prove
How it gets proven — Statamic → Microsoft Ads
Source of truth
Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.
- The MSCLKID confirmed present on a live order.
- Auto-tagging confirmed on, and the accepted count reconciled against conversions appearing in campaign reporting.
- Order data confirmed persisted on a purchase made while full static caching was active.
Statamic → Microsoft Ads · free audit
What we check in the free audit
- Count orders carrying the MSCLKID
- Follow one real conversion end to end
- Check whether full static caching is enabled
- Confirm auto-tagging is enabled and check the upload diagnostics
- Read the match rate, not the success message
Checked against
Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.
Free30 minutesNo obligation
Statamic → Microsoft Ads · when not to buy
When you don't need this — Statamic → Microsoft Ads
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the MSCLKID.
- If commerce lives in a separate system entirely, work there — Statamic is the content layer.
- 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.
Statamic → Microsoft Ads · what we deliver
What gets built — Statamic → Microsoft Ads
Identifier capture into Statamic
Capture the identifier and persist it through a Laravel event listener into your own order table, entirely outside the static cache path.
Event source: your Laravel application's order event
Fire from the application event. Static caching means the template that rendered the page may never have executed anything.
Dispatch to Microsoft Ads
Offline conversion import through the Microsoft Advertising API or a scheduled upload.
Reversals where they exist
Whatever your application defines as a refund.
Written guarantee
95%+ tracking accuracy
Measured against Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Statamic → Microsoft Ads questions, answered
Read it in the browser, from the URL or the UET cookie, into a hidden form field, and store it from the Laravel form listener. Server-side capture on the landing page does not run under full static caching.
It depends on your static caching configuration; query strings may be ignored or produce separate cached files. Check the setting, because every ad click brings a unique click ID.
Almost always because the MSCLKID never reached the Statamic or Laravel order record. Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run. Measure coverage before debugging the dispatch.
The MSCLKID, appended to your landing page URL when auto-tagging is enabled in the Microsoft Ads account. Auto-tagging is not on by default in every account, which is the single most common reason a Microsoft offline import finds nothing to match. Microsoft also supports enhanced conversions using hashed customer data as an alternative path.
Your Laravel application's order event. Fire from the application event. Static caching means the template that rendered the page may never have executed anything.
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.
More on Statamic → Microsoft Ads
- Microsoft · Lead → booked callHow to track lead to booked call for Microsoft Ads
- Microsoft · Booked call → closed wonHow to track booked call to closed won for Microsoft Ads
- Microsoft · Free trial → paidHow to track free trial to paid for Microsoft Ads
RELATED GUIDES
Where Statamic → Microsoft Ads fits in the rest of your tracking
- Microsoft · Local servicesMicrosoft Ads conversion tracking for local service businesses
- Microsoft · B2BMicrosoft Ads conversion tracking for B2B companies
- Microsoft × CRM DealsHow to reconcile Microsoft Ads against your CRM's closed-won deals
- Microsoft · Comparison page → demoHow to track comparison page visit to demo request for Microsoft Ads
- AEM → Microsoft AdsConnecting Adobe Experience Manager to Microsoft Ads
- Statamic → SnapchatConnecting Statamic to Snapchat
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Craft → Microsoft AdsConnecting Craft CMS to Microsoft Ads
Free · 30 min
Get Statamic and Microsoft Ads joined properly
Free30 minutesNo obligation
