Skip to content

Server-side conversions

Send each Leadux lead from our server to GA4 and the Meta Conversions API, so ad blockers don't hide conversions from visitors who agreed to tracking.

The widget's Leadux event runs in the visitor's browser, so ad blockers and strict browser settings can stop it. Server-side conversions add a second route: when a lead comes in, Leadux sends the conversion from its own server to Google Analytics 4 and to Meta. This is optional and set per website.

How to set it up

  1. Go to Websites → your website → Tracking.
  2. Under Google Analytics 4, enter your Measurement ID and API Secret.
  3. Under Meta (Facebook) Ads, enter your Pixel ID and Conversions API Token.
  4. Click Save Changes.

You can fill in one platform, or both. A platform is only used when both of its fields are filled in. The secret and the token are stored encrypted.

Note: Fill in the GA4 fields only if GA4 isn't installed on your website. See Deduplication with the browser event.

Server-side events follow what the visitor chose in your website’s cookie banner. The widget reads your site’s Google Consent Mode state and sends it with each message, and Leadux uses the latest choice when the lead comes in:

Platform Sent only when
GA4 analytics_storage is granted
Meta ad_storage is granted, and ad_user_data isn’t denied

If your website has no Google Consent Mode, for example because your cookie banner doesn’t support it, Leadux has no signal and sends no server-side events. Most consent tools, such as Cookiebot, Usercentrics and Borlabs, support Consent Mode; switch it on in their settings.

The browser Leadux event isn’t affected: it goes to whatever tags are on the page, and those follow your banner themselves.

Where to find the GA4 details

  1. In Google Analytics, open Admin → Data streams and select your website's stream.
  2. The Measurement ID is at the top of the stream details. It starts with G-.
  3. Open Measurement Protocol API secrets, click Create, give it a name such as "Leadux" and copy the secret value.

Where to find the Meta details

  1. In Meta Events Manager, select the pixel (dataset) your website uses.
  2. The Pixel ID is shown under its name, a long number.
  3. Open Settings → Conversions API and generate an access token. Copy it straight away: Meta shows it only once.

What Leadux sends

Leadux sends one event per lead, as soon as the lead is first captured. Details the visitor adds afterwards are not sent again.

To GA4 (Measurement Protocol):

  • Event name Leadux, with the parameters event_id, conversation_id and page_location (the page the chat started on).
  • The visitor's GA client ID from their _ga cookie, so the event joins their existing GA4 user. Without the cookie, Leadux uses the widget's own session ID.

To Meta (Conversions API):

  • Event name Leadux, action_source: website, the time the lead was captured, event_id and event_source_url (the page the chat started on).
  • User data: the email address and phone number, both normalised and hashed with SHA-256 before they leave Leadux, the visitor's IP address and browser user agent, and the _fbp and _fbc values when the visitor has them. If the visitor came from a Meta ad but has no _fbc cookie, Leadux builds the value from the fbclid in the landing page address.

Deduplication with the browser event

Every lead has one event ID. The widget sends it with the browser event (eventID for the Meta Pixel, leadux_event_id and event_id for GA4 and the data layer), and the server-side events carry the same ID.

  • Meta merges a pixel event and a Conversions API event with the same event name and event ID into one conversion. You can run both safely, and Meta counts visitors the pixel missed.
  • GA4 doesn't merge events this way. If the browser event already reaches your GA4 property, adding the GA4 credentials here records two Leadux events for every lead. Use server-side GA4 only for a property the browser event doesn't reach, or leave the GA4 fields empty.

To see what already arrives, leave a test lead and check GA4 Reports → Realtime. See Conversion tracking.

Good to know

  • Mention the server-side delivery in your privacy policy. See Privacy and GDPR.
  • If Google or Meta reject an event, for example because a token was revoked, Leadux doesn't try again and doesn't show an error. After changing credentials, leave a test lead and check GA4 Realtime, or the pixel's Overview in Meta Events Manager, where server events are listed with the Conversions API as their source.
  • Server-side events don't replace a Google Ads conversion tag. For Google Ads, set up a tag on the Leadux trigger in Google Tag Manager.

Last updated . Questions? Write to support@leadux.com.