# Twitter tracking link: how to track clicks and sales from X posts and X Ads

> Make a Twitter tracking link that survives t.co, tag it with UTMs or a sub-ID, read twclid on X Ads clicks, and know what the X pixel can and can't do.

Source: https://hoplytic.com/blog/twitter-tracking-link · Updated 2026-11-29 · Hoplytic Guides

Video version (76 seconds): [https://hoplytic.com/video/twitter-tracking-link.mp4](https://hoplytic.com/video/twitter-tracking-link.mp4)

## Video transcript

You post a link on X and the merchant reports two sales. Which post earned them?

X redirects with every parameter intact, but the referrer is hard to read. So the label has to be in your link.

Give your bio one link, labeled x dash bio. Give each post or thread its own link, labeled with a date or topic. And replies a separate label, since they behave very differently.

On an X ad, this is your own tracking link. Type your own campaign and ad values, since X has no reliable macros for them. X adds its own click ID, called twclid, by itself.

The X pixel can't run on a merchant's checkout. So store the twclid with each click. Put your own click ID in the network's sub-ID. When the sale comes back, send it to X's Conversion API with that click's twclid.

Hoplytic stores the twclid and any value you typed with each click. Link previews are labeled as bots, never counted or charged. It doesn't send sales to X itself. Pull clicks and sales through the API and report them from your own script.

The full guide is right below. Hoplytic: ad tracking made simple.

## Key points

- Every link posted on X is wrapped in a t.co link that counts as 23 characters, so a long tracking URL costs no extra space and a short one saves none.
- Use one tracking link per post or campaign with a fixed label, because referrers from X are often missing or just show t.co.
- X Ads add a twclid click ID to website click-throughs by themselves; store it with the click so a sale can be reported back through X's Conversion API.
- X has no reliable URL macros for campaign or ad IDs, so type campaign values into the URL yourself.
- The X pixel only fires on pages you control, so for affiliate sales the click ID plus a server-side report is the route that works.

You post a link on X, people click, and the merchant reports two sales. Was it the pinned post, the thread or the reply under a big account? A Twitter tracking link answers that, and with X Ads it can also tell X which clicks bought.

**Short answer:** post a tracking link, not the raw affiliate URL: one link per post or campaign, with a label such as `x-thread-nov27` in a sub-ID or UTM. X wraps it in t.co but the parameters survive. On X Ads, X adds a `twclid` click ID to the landing URL by itself; store it with the click, and use X's Conversion API with that ID to report sales, since the X pixel can't run on a merchant's checkout.

## What happens to a link on X

Every link in a post is replaced with a `t.co` address. X's help says any URL counts as 23 characters, whatever its real length, and you can't opt out. The visitor clicks the t.co link, X checks it against its list of unsafe sites, then redirects to your URL with every parameter intact.

Two practical results:

- **Length doesn't cost characters.** A 140-character tracking URL takes the same 23 characters as a 20-character one. A short link on your own domain still helps, because it's what people see and trust in the post.

- **The source is hard to read from the referrer.** Clicks from X's apps often arrive with no referrer, and web clicks may show only `t.co`. You can't tell one post from another that way. The label in your link has to do it.

## Building a Twitter tracking link

Which kind you need depends on where the link goes.

| Link goes to | Tag it with | Example |
| --- | --- | --- |
| Your own site | UTM parameters | `yoursite.example/vpn-deals?utm_source=x&utm_medium=social&utm_campaign=nov-thread` |
| An affiliate offer, directly | A tracking link that fills the network's sub-ID | `go.yoursite.com/vpn-x1` redirecting to the offer with `aff_sub=c7f3a9e1&aff_sub2=x-thread-nov27` |
| An affiliate offer, from an X ad | The same, plus your campaign label; X adds `twclid` | `go.yoursite.com/vpn-xads?campaign=spring-sale` |

Keep a fixed source value (`x` or `twitter`, pick one and never mix) and lowercase everything. The full naming rules are in [UTM parameters on affiliate links](https://hoplytic.com/blog/utm-parameters-affiliate-links). Remember that UTMs on a direct affiliate link only inform the merchant; to get a label back with your commission it has to go into the network's sub-ID, as [UTM vs sub-ID](https://hoplytic.com/blog/utm-vs-sub-id) explains.

## One link per post, not one link for your profile

If the same link is in your bio, your pinned post and three replies, every click and sale is merged. A simple plan:

- **Bio:** one link, labelled `x-bio`. If it goes to a link-in-bio page, see [link in bio tracking](https://hoplytic.com/blog/link-in-bio-tracking).

- **Each post or thread with a link:** its own link, labelled with a date or topic, like `x-thread-nov27`.

- **Replies and quote posts:** a separate label if you post links there often, because they behave very differently from your own timeline.

Making a link takes a minute; a week later you'll know which kind of post earns.

## Preview cards and bot clicks

When you post a link, X fetches the page to build the preview card, and so do other apps when someone shares the post in a chat. Each fetch is a request to your tracking link. Crawlers like X's card fetcher identify themselves, so a tracker that recognizes link previews can keep them out of your counts. If yours doesn't, expect a burst of "clicks" in the first minute after posting that never convert. More in [bot clicks on affiliate links](https://hoplytic.com/blog/bot-clicks-affiliate-links).

Never try to show the preview crawler a different page from real visitors. That's cloaking: it breaks X's rules and every ad network's, and gets accounts suspended.

## X Ads: twclid and campaign labels

X's developer docs say website click-throughs from X ads append `twclid` to the landing-page URL. You don't need to add a macro for it. A click from a promoted post might arrive as:

`https://go.yoursite.com/vpn-xads?campaign=spring-sale&ad=video-a&twclid=2-7f3k9qa1x8c4m2b`
X doesn't offer reliable URL macros for campaign or ad IDs the way Google or Meta do, so type the values yourself: one link or one fixed `campaign` value per campaign, and an `ad` value per creative if you test several. The [X Ads macros](https://hoplytic.com/blog/x-ads-macros) page has the current list of what X fills in.

## The X pixel and the Conversion API

X measures conversions in two ways, both tied to an event you create in Events Manager:

- **X pixel:** a script on your website that fires when a visitor completes an action. It only works on pages you control. On an affiliate offer, the purchase happens on the merchant's site, so the pixel can at most record a click on your landing page button, which is not a sale.

- **Conversion API:** your server sends the conversion to X. It needs at least one identifier: the `twclid`, a hashed email or a hashed phone number (an IP address or user agent only counts alongside another one). For affiliates, the twclid is the only identifier you'll normally have.

So the affiliate flow is: store the twclid with the click, put your own click ID in the network's sub-ID, and when the sale comes back by postback, send a conversion to X's Conversion API with that click's twclid, the event ID and the commission as the value. If you also fire the pixel for the same event, send the same `conversion_id` from both so X counts it once. X's [Conversion API docs](https://docs.x.com/x-ads-api/measurement/web-conversions) list the fields and limits.

The same pattern works on other platforms; [ad click IDs explained](https://hoplytic.com/blog/click-ids-gclid-fbclid-ttclid) compares them.

## Checking the link before you post

- Run it through the [redirect checker](https://hoplytic.com/tools/redirect-checker) and confirm the sub-ID, or the twclid on an ad link, is still there at the final hop.

- Click it from the X app on a phone, not just a desktop browser; in-app browsers sometimes behave differently.

- After the first day, compare your tracker's human clicks with the link clicks in X's post analytics, if your account shows them. Some gap is normal; a large one points to previews being counted or a broken redirect.

## Doing this with Hoplytic

Paste the affiliate link, choose **X (Twitter) Ads** or "No ad platform" as the source, and set a custom short code like `vpn-x1` on your own domain. Hoplytic fills the network's sub-ID with its click ID, stores `twclid` and any value you typed (such as `campaign`) with each click, and labels link previews and crawlers as bots, never counted or charged. Hoplytic doesn't send sales to X itself: X isn't one of its send-back platforms. You can pull clicks with their twclid and your sales through the [API](https://hoplytic.com/docs/api) and report them to X's Conversion API from your own script.

![Making a tracking link for PropellerAds in Hoplytic: paste the offer link, pick the ad platform, and its click ID, zone and campaign macros are added to the tracking link.](https://hoplytic.com/video/howto-link-ad-platform.gif)

*Pick the ad platform and its macros are added to your tracking link.*

## Questions people ask

### How do I track clicks on a link in a tweet?

Post a tracking link instead of the raw destination: a link from a tracker or shortener that counts clicks, or a link to your own site with UTM parameters your analytics reads. X's post analytics, where your account has them, also shows link clicks per post.

### Does X remove UTM parameters from links?

No. X wraps the link in t.co, but the visitor still lands on the full URL with its parameters. If UTMs disappear, a redirect after the click usually dropped them.

### What is twclid?

The X click ID. X appends twclid to the landing-page URL on website click-throughs from X ads. Sending it back with a conversion through the X Conversion API lets X match the conversion to the ad click.

### Why does my tracker show more clicks than X analytics?

When you post a link, X and other apps fetch it to build a preview card. Those fetches hit your tracking link but aren't people. A tracker that labels link previews as bots keeps them out of your human click count.
