Integrations

X Conversions API

Send X Ads conversions from the server through the X Conversions API, so they arrive even when the browser blocks the X Pixel. Every event is assembled from the whole DataCops platform, so X receives clean, verified conversions, counted once. No code.

What it is

The X Conversions API is the server-to-server way to report X (formerly Twitter) ad conversions, instead of relying only on the X Pixel in the browser. DataCops sends each conversion from the server to your X pixel, with the twclid and the hashed email and phone X uses to match it to the person who saw or clicked your ad.

X is one of nine ad platforms DataCops sends to: Meta, Google Ads, TikTok, LinkedIn, Microsoft Ads, Reddit, Pinterest and X. Like Meta and TikTok, X connects with a token you make in your own account, so there is no X sign-in to approve.

Sending from the server is only half of it. DataCops builds each X event from every part of the platform: first-party capture, the 400-day identity, email verification, the fraud check and the consent check. X receives a checked record of a real conversion, not just a pixel firing.

Why the X Pixel loses sales

The X Pixel runs in the browser, which is where tracking is weakest:

  • It gets blocked. Ad blockers, Safari limits and rejected consent all stop it, so the conversion never reaches X.
  • It arrives thin. When it fires, it often carries little X can tie to a real account.
  • It counts bots. A browser pixel fires for any visitor, so X can learn from conversions that were never real.

These are data problems. DataCops fixes the data before X ever sees the event.

How DataCops builds each event

A DataCops X event is assembled as the visitor moves through your site. Each part of the platform adds what it knows, so the event is complete and checked by the time a conversion happens.

Here is what each part adds, in order:

  • First-party capture keeps the ad click. X adds a twclid to the link when someone clicks your ad. DataCops reads it from the landing page and stores it with the visit, so it is there when the conversion happens later.
  • The 400-day durable identity attaches the person. If someone converts anonymously today but identified themselves earlier, DataCops attaches their email and phone.
  • Email verification checks the match key. The email is checked before it becomes a hashed match key, so you are not matching against a fake inbox.
  • Real people only can gate out fakes. Turn it on for X and bot and datacenter traffic is held back before it is sent. It is set per platform and is off by default. Blocking VPN, proxy and Tor traffic is an extra option.
  • The consent check decides if it can go. The server checks consent again before every send. If consent was rejected, the event is skipped for X and the skip is logged.

The match signals sent to X

X matches a conversion using the identifiers attached to it. DataCops sends every one it has. Email and phone are normalised and hashed with SHA-256 on the server before they leave, so X never receives them raw.

SignalWhat it does for matchingWhere DataCops gets it
twclidThe X click ID. The most direct link between a conversion and the ad click behind it.Read from the ?twclid= link on the landing page
Email (hashed)Matches the buyer to their X account when there is no click ID.Verified real, then lowercased, trimmed and hashed on the server
Phone (hashed)A second match key, in the exact format X asks for.Turned into E.164 format with the leading plus, then hashed on the server

The phone format matters. X wants the number in E.164 format, with the country code and the leading plus, before it is hashed. A number hashed without the plus will not match, so DataCops adds it for you.

Each event also carries the conversion itself: the X Event ID you saved for that kind of event, the time it happened, a conversion ID, and the order value (a decimal such as 20.00) and currency when there is one. X needs at least one of twclid, email or phone, so an event with none of them is skipped and logged instead of being sent empty. An event with no X Event ID saved is skipped too, and the delivery log says so.

Counted once, never twice

Every DataCops event carries one steady ID, sent to X as the conversion ID. X uses the conversion ID to spot a repeat, so the same conversion sent twice with the same ID is counted once. DataCops also catches a repeat of the same order before it goes out.

You can turn on server-side delivery without removing anything. If you keep the X Pixel running, X counts its events on their own unless the pixel sends the same conversion ID, so check both in X Events Manager and decide what to keep.

Connect with a Pixel access token

A Pixel access token is made on your own X pixel, in your own X Ads Manager. It belongs to the pixel, so there is no X sign-in and no developer account to set up. DataCops uses it to send every clean conversion to that pixel.

You need access to Events Manager in your X Ads account.

  1. Open Events Manager

    Go to X Ads Manager, open Tools, then Events Manager. If you have no X pixel yet, press Add event source and add one. The ID of that event source is your Pixel ID, a short code such as ppocu.

  2. Generate the access token

    Press Install Pixel, choose Manual, then Conversion API, and press Generate access token. Copy it straight away and treat it like a password: never share it in a chat or a screenshot.

  3. Copy the Event ID of each event

    X asks for the Event ID of each conversion, not a name. Open your pixel and copy the Event ID of the events you want X to learn from, such as Purchase and Lead. An Event ID looks like tw-ppocu-ppocv. If an event does not exist yet, press Add events, choose Install with Conversion API, and save it.

  4. Paste the token and the Pixel ID into DataCops

    In DataCops open Configuration, then Ads Account. On the X card press Connect with token, paste the token and the Pixel ID, and press Connect.

  5. Add your Event IDs

    Press Manage on the X card, open Settings, and paste each Event ID next to its event in X Event IDs. An event with no Event ID is not sent to X, and the delivery log says so.

X has no test mode, so DataCops cannot send a trial event for you. It checks that the token and the Pixel ID are shaped right, and X confirms the token with your first conversion. If X stops accepting the token, the X card shows Needs reconnect. Make a new token in Events Manager and press Use token.

Good to know before you start

  • X allows 60,000 events per ad account in 15 minutes. That limit is on your own pixel, so DataCops does not share it with anyone else.
  • The twclid is read from the landing page link.
  • Phone numbers are sent in E.164 format, the way X asks.
  • Your X Pixel can keep running next to DataCops.

An honest delivery log

A browser pixel fires and forgets. DataCops records every send: one row per event, marked sent, skipped or failed, with the reason shown, like rejected consent, a missing pixel, an event with no X Event ID yet or an event with nothing to match on. The order value shows in the log too. So you can see, per conversion, exactly what reached X and why.

X is one of the newer connections in DataCops. Check your first sends in the delivery log and in X Ads Manager, then let it run.

Was this page helpful?