Skip to main content
When you finish, DATALYR sends conversions to X’s Conversion API and runs the X Pixel. When both send one conversion, X keeps one copy.

Before you start

X’s Conversion API takes website events only. DATALYR doesn’t import X spend or ad stats.
Treat the access token as a secret. It can send conversions to your pixel. Don’t paste it into a screenshot or a public issue.

Connect X

1

Open the form

Open Sources. Select Connect on the X Ads row.
2

Paste the credentials

Fill Pixel ID and Conversion API access token.
3

Save

Select Connect. The X events step opens.
DATALYR checks the token with a request X can’t record as a conversion.

Add your X events

1

Copy an Event ID

Select Open X Events Manager. Copy the event’s ID.
2

Paste it

Paste the ID into the matching row. Leave a row blank to skip it.
3

Save

Select Save. DATALYR creates one rule per trigger, such as each Stripe payment event under Purchase Tracker.
To come back later, select Manage on X Ads, then X events. Renewals are never created here. To build a rule by hand, pick X as target platform in Conversions. Paste the ID into X Event ID.

Tag your ads

X adds its click ID, twclid, to every website click. Keep it on the landing URL through every redirect.
  1. Open Track. Create a link.
  2. Under paste into your ads, find X Ads. Select copy parameters.
  3. In X Ads Manager, paste them into the ad’s Add URL tracking.
X publishes no macro reference. Check that each macro is in the variable list in X Ads Manager before you launch.

Reference

Events

The X Event ID decides what X counts. The type only picks the value rules below.

Matching fields in identifiers

X needs twclid, hashed_email, or hashed_phone_number. twpid, IP, and user agent only add to one of them.

Deduplication

The pixel copy and the server copy carry the same Event ID and conversion_id: a purchase’s order ID, else the DATALYR event ID. X keeps one when both arrive within 48 hours. Retries reuse the conversion_id. If your own code fires X events, remove those calls. They carry other IDs, so X counts them again.

The X Pixel

DATALYR loads X’s pixel through your tracking script as soon as X is connected. It sends no email or phone.

Why X shows different numbers

DATALYR credits clicks. X also settles its reports 24–48 hours after the impression, so recent days move.

Verify

  1. Open Conversions. Select manage rules. Open an X rule.
  2. Select send test event. X has no test mode, so DATALYR checks the event and sends nothing.
  3. Trigger one real event.
  4. Confirm the rule’s sent count went up by 1.
  5. In X Ads Manager, open Tools → Events Manager.
  6. Open the event. Confirm X recorded your conversion.

When it does not work

Next