On this page
What this issue is
- Visitor submits formBrowser request carries real IP and user agent
- Your server or webhookEvent is built without copying those values
- Event sent to platformArrives with no IP, or your server's IP
- MatchingEvent can't be tied to the ad click
The browser request has the real IP and user agent. They are dropped before the event is sent on.
Why it costs you leads or sales
Example: 100 real leads in a week. Illustrative numbers only; your results will differ.
How to check if your site has it
Open the platform's diagnostics
In Meta Events Manager, open your pixel or dataset, then the Overview and Diagnostics tabs. Look at Event Match Quality and any warning about missing customer information parameters. In TikTok Events Manager, check the event details for matching warnings.
Use the test events tool
In Meta Events Manager, open Test events, copy the test code, and add it to your server event as test_event_code. Trigger a real test conversion and open the received event to see which user data fields arrived.
Read the raw payload
Log or inspect the JSON your server sends. Look for client_ip_address and client_user_agent inside user_data. If they are absent, or the IP is one of your own server's, you have the issue.
Compare with browser events
If you run the browser pixel and the server event together, compare their match quality and counts. A big gap on server events points at missing signals.
How to fix it
Read the headers from the visitor's request
Take the user agent from the User-Agent header. Take the IP from the connection, or from X-Forwarded-For if you sit behind a proxy or CDN. Use the first address in that list, and only trust the header from proxies you control.
Add both to user_data
Set client_ip_address and client_user_agent in the event body. Send them as plain values, not hashed. Hash only fields like email and phone.
Keep them when events are queued
If you send events later from a background job, store the IP and user agent when the request happens. Otherwise the job will send its own values.
Use a server container client
In server-side GTM, the web request already includes the visitor's IP and user agent. Make sure the browser tag sends to your server container URL rather than a custom proxy that hides them.
Check the Meta CAPI tag
Open the Conversions API tag in the server container. Leave the option that overrides IP or user agent empty unless you are setting real values.
Preview a request
Use Preview mode, click the incoming request and confirm ip_override and user_agent values look like a real visitor.
Check your CAPI plugin settings
Plugins that send Meta or TikTok events from PHP read the visitor's IP and user agent from the request. Update the plugin and look for settings about advanced matching or customer information.
Check caching and proxies
If a CDN or reverse proxy sits in front, make sure the plugin reads the forwarded IP header. Your host or CDN docs show the right header name.
Use the official channel
Shopify's Facebook and Instagram channel and Google and YouTube channel send server events with visitor data from checkout. Reconnect them in Settings, then Apps and sales channels if data sharing is limited.
Set data sharing to maximum
In the Facebook and Instagram channel, choose the highest data sharing level so customer information can be sent.
Avoid custom relays
If a third-party tool forwards Shopify webhooks to Meta, check it passes the browser IP and user agent. Order webhooks may not carry them unless the app captures them earlier.
Check how events are sent
Workflow webhooks run from the platform's servers, so the IP is theirs. Where possible use the built-in Facebook conversion option, or capture the visitor's details on the form page and pass them along.
{
"data": [{
"event_name": "Lead",
"event_time": 1735689600,
"action_source": "website",
"event_source_url": "https://example.com/thank-you",
"user_data": {
"client_ip_address": "203.0.113.42",
"client_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...",
"em": ["<sha256 of lowercase email>"]
}
}]
}<?php
$ua = $_SERVER['HTTP_USER_AGENT'] ?? '';
// Behind a trusted proxy or CDN only:
$fwd = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? '';
$ip = $fwd ? trim(explode(',', $fwd)[0]) : ($_SERVER['REMOTE_ADDR'] ?? '');
$user_data = [
'client_ip_address' => $ip,
'client_user_agent' => $ua,
];Before
- user_data has only a hashed email
- Or the IP is your server's
- Platform reports low match quality
After
- user_data includes visitor IP and user agent
- Hashed email and click IDs sent alongside
- More conversions matched to ads
How to confirm it's fixed
- Send a test event with the platform's test code and see client_ip_address and client_user_agent in the received data
- Check the IP differs from your server's and matches the device you tested with
- Confirm different test visits show different IPs
- Watch Event Match Quality over the next few days for improvement
- Check browser and server events still deduplicate (same event_id on both)
How to prevent it happening again
- Store IP and user agent with the lead or order at the moment of the request, so later jobs can reuse them
- Add a test that fails if user_data lacks these fields
- Re-run a test event after changing hosting, CDN, proxy or plugins
- Check Events Manager diagnostics monthly
- Note in your docs which header your proxy uses for the real IP
How FunnelGuard handles this
Questions people ask
Why is my Meta Conversions API event match quality low?
A common cause is missing customer information, especially client_ip_address and client_user_agent. Check a received event in Test events to see which fields arrived. Also send a hashed email, phone number and the fbp and fbc values where you have them.
Is client_user_agent required for Meta Conversions API?
Yes, for events with action_source set to website, Meta requires client_user_agent. The client_ip_address is not strictly required but is strongly recommended, because it improves matching.
Why do all my server events show the same IP address?
Your server, cloud function or automation tool is sending its own IP instead of the visitor's. Capture the IP from the original browser request, or from the forwarded header behind a proxy, and include it in each event.
How do I get the visitor's real IP behind Cloudflare or a proxy?
Read the forwarded header your proxy sets, such as X-Forwarded-For, and use the first address. Only trust that header when it comes from a proxy you control, since visitors can fake it otherwise. Your CDN's documentation names the exact header.
Should I hash the IP address and user agent?
No. For Meta, client_ip_address and client_user_agent are sent as plain values. Hash fields such as email and phone number using SHA-256 after trimming and lowercasing.
Can I send the IP and user agent from a webhook or Zapier?
Only if you captured them earlier and pass them through. A webhook that runs on a vendor's servers has that vendor's IP. Save the visitor's values on the form submission, then include them in the event.
Does FunnelGuard detect missing IP or user agent in server events?
No, not yet. It is a possible future check. FunnelGuard does monitor your journeys and the tracking hits sent to ad platforms, so you can catch broken forms and tags, but use Events Manager diagnostics for payload details.
Related issues
- TRK-370Server events missing fbp/fbcFix guide
- TRK-368Meta CAPI token expiredFix guide
- TRK-367Server-side GA4 event not arriving (Measurement Protocol)Fix guide
- TRK-375TikTok Events API token invalidFix guide
- TRK-371Shopify/WooCommerce native CAPI app disconnectedFix guide
- TRK-373Webhook to analytics (Zapier) failing silentlyFix guide