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

November 29, 2026 · Hoplytic team · 6 min read

The short version: this guide in 76 seconds.
Read the 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

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.

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:

Which kind you need depends on where the link goes.

Link goes toTag it withExample
Your own siteUTM parametersyoursite.example/vpn-deals?utm_source=x&utm_medium=social&utm_campaign=nov-thread
An affiliate offer, directlyA tracking link that fills the network's sub-IDgo.yoursite.com/vpn-x1 redirecting to the offer with aff_sub=c7f3a9e1&aff_sub2=x-thread-nov27
An affiliate offer, from an X adThe same, plus your campaign label; X adds twclidgo.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. 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 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:

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.

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 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:

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 list the fields and limits.

The same pattern works on other platforms; ad click IDs explained compares them.

Checking the link before you post

  1. Run it through the redirect checker and confirm the sub-ID, or the twclid on an ad link, is still there at the final hop.
  2. Click it from the X app on a phone, not just a desktop browser; in-app browsers sometimes behave differently.
  3. 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 and report them to X's Conversion API from your own script.

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.

More in Traffic sources and macros

Also: tracking glossary · ad platform macros · Markdown copy