On this page
What this issue is
The Conversions API lets your server send events (such as Lead or Purchase) to Meta directly, alongside the browser Pixel. Each server event can include event_source_url, the full address of the page where the action happened. For website events Meta expects it, and it should be a page on your own verified domain.
This issue happens when that value points to something like https://staging.example.com/thank-you or a *.myshopify.com preview, while real customers are on https://www.example.com. It is usually caused by an environment setting, a hard-coded URL, or a plugin or server tag copied from staging to production.
Why it costs you leads or sales
Meta uses the source URL to understand where an event came from, and it checks it against your domain setup. A wrong domain can mean events are ignored, counted against the wrong place, or shown under a domain you do not own. That weakens attribution and gives the ad algorithm fewer reliable conversions to learn from, so campaigns can cost more per lead or sale.
The impact is usually medium: events still arrive, so nothing looks obviously broken. Reports just become less trustworthy. Staging events also pollute your real data if test purchases are sent to the live dataset.
- Visitor convertsForm or checkout on the live domain
- Server builds CAPI eventevent_source_url taken from a staging setting
- Meta receives eventDomain does not match your verified domain
- Attribution and optimisationWeaker signal for campaigns
The visitor converts on the live site, but the server builds the event with a staging URL.
How to check if your site has it
Open Events Manager
In Meta Events Manager, select your dataset (Pixel), then open the Test events or Overview tab.
Look at server events
Click a recent event marked as coming from the server (Conversions API) and read the event details for the source URL.
Check the Diagnostics tab
Look for warnings about domains or URLs that do not match your verified domain.
Inspect your own payload
Log the JSON your server sends to Meta, or open your server-side tag's preview, and read the
event_source_urlfield.Search the code and settings
Search your code, plugin settings and environment variables for the staging hostname.
// Wrong
{"event_name":"Lead","event_source_url":"https://staging.example.com/thank-you","action_source":"website"}
// Right
{"event_name":"Lead","event_source_url":"https://www.example.com/thank-you","action_source":"website"}How to fix it
The best fix is to take the URL from the real request the visitor made, not from a fixed setting. If you must use a setting, make it different for each environment and set the live value in production.
Check the site address
Go to Settings > General and confirm WordPress Address and Site Address use your live domain. A database copied from staging often keeps the old one.
Check your CAPI plugin
Open the settings of the plugin that sends CAPI events (Meta's official plugin, a WooCommerce add-on or a tag plugin). Look for any fixed URL or domain field and update it.
Search the database
Search options and plugin tables for the staging hostname and replace it with a search-and-replace tool that handles serialised data.
Check the connection
In the Facebook & Instagram sales channel, confirm the Pixel and Conversions API data sharing is connected to the live store.
Check custom senders
If a third-party app or custom server sends CAPI events, make sure it reads the page URL from the live storefront, not a preview or
myshopify.comaddress.
Open your server container
In server-side GTM, open the Meta Conversions API tag and look at the event source URL field.
Use the page location
Map it to the incoming event's page location (usually
page_location) instead of a typed-in value.Publish and check the right container
Make sure the live site points to the production server container, not a staging one.
Check the forwarding tool
Webflow does not send CAPI itself. Check the tool or server that does, and make sure it uses the live domain.
Check the published domain
Confirm events come from the custom domain, not the
webflow.iostaging address.
Build the URL from the request
Compose the URL from the live request's scheme, host and path, or pass it from the browser with the event. See the snippet below.
Split settings by environment
Keep the base URL in an environment variable and set a different value on staging and production.
// Browser: send the real page URL with your form or order data
fetch('/api/lead', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ email, pageUrl: window.location.href })
});
// Server: use it in the Conversions API event
const event = {
event_name: 'Lead',
event_time: Math.floor(Date.now() / 1000),
action_source: 'website',
event_source_url: req.body.pageUrl,
user_data: { em: [hashedEmail] }
};Before
- event_source_url is a staging address
- Diagnostics may warn about domain mismatch
- Staging and live events mix in one dataset
After
- event_source_url is the live page the visitor was on
- Domain matches your verified domain
- Staging uses its own test dataset or sends nothing
How to confirm it's fixed
Run a test conversion
Submit a test lead on the live site. Use the Test events tab in Events Manager with your test event code if you want to see it right away.
Read the server event
Open the event marked as from the server and check the source URL is the live page.
Recheck Diagnostics
Wait for new events and make sure domain warnings clear.
Remove the test code
Take the test event code out of production once you have finished.
How to prevent it happening again
- Keep the base URL in an environment variable, never hard-coded
- Use a separate Pixel or dataset and access token for staging
- Add an allowlist check for hostnames before sending events
- Review CAPI settings after every site copy, migration or plugin update
- Check Events Manager Diagnostics after each release
- Verify your domain in Business Manager
How FunnelGuard handles this
FunnelGuard does not check this yet. Reading the event_source_url of server-side events is a possible future check, but it is not part of the product today, so do not rely on FunnelGuard for it.
What FunnelGuard does today is run your real journeys, such as a lead form or checkout, from the EU or the US on a schedule, and check each step and the tracking hits sent from the browser to platforms like Meta, GA4 and Google Ads. It also checks that test leads reach your inbox and CRM. If a step breaks, a failure is re-checked from a second region and you get one alert with a screenshot and a likely cause. That covers browser-side problems near this one, but not the content of your server-side payload.
To watch for this yourself, review the server events in Meta Events Manager after each release, keep an eye on the Diagnostics tab, and log your outgoing CAPI payloads with an alert on any hostname that is not on your allowlist. A free FunnelGuard plan (1 site, 2 journeys, daily checks) can still cover the journey itself.
Questions people ask
Why is my Conversions API sending a staging URL as event_source_url?
Usually the server reads the URL from a setting, environment variable or plugin option that was copied from staging, or it is hard-coded. It can also happen when production code runs behind a staging hostname. Search your code and settings for the staging domain and replace it.
What should event_source_url be in Meta CAPI?
It should be the full address of the page where the action happened, such as https://www.example.com/thank-you. It should be on your own domain, ideally one verified in Business Manager. Take it from the visitor's real request or page.
Is event_source_url required for the Conversions API?
Meta requires it for website events, which use action_source set to website. Leaving it out or sending a wrong value can cause events to be rejected or misread. Always send the live page URL.
How do I see which URL my CAPI events are sending?
In Meta Events Manager, open your dataset and click a recent event marked as coming from the server. The event details show the source URL. You can also log the JSON payload on your own server.
Can staging events hurt my Meta ad performance?
They can. Test events mixed into your live dataset add noise, and wrong domains can weaken attribution. Meta's optimisation then has less reliable data, which can raise your cost per result.
Does FunnelGuard detect a wrong event_source_url?
No. FunnelGuard does not check this yet, though it is a possible future check. It does run your real journeys and check browser-side tracking hits, so use Events Manager and payload logging for this issue.
How do I stop staging from sending events to my live Pixel?
Give staging its own Pixel or dataset and access token, or turn CAPI off there. Store the Pixel ID and token as environment variables so the live values exist only in production.
Related issues
- TRK-179CAPI not deduplicating with browser event (event_id mismatch)Fix guide
- TRK-180CAPI events missing entirelyFix guide
- TRK-189Test event code left on production pixelFix guide
- TRK-190Domain not verified in Business ManagerFix guide
- TRK-167Wrong Pixel ID (old business manager pixel)Fix guide
- TRK-181CAPI event_time in wrong timezone or futureFix guide