How to Track Website Traffic and Conversions From X

Published:

Your X posts get clicks, but you still can’t tell which ones bring subscribers or customers. A busy account gives you plenty to check and very little help deciding whether another hour of posting is worthwhile.

Around 2022, I spent six months chasing Instagram and Twitter followers in another niche while my bank balance stayed around $47. The setup below connects X promotions to website visits, leads, and sales, with checks to catch missing or duplicate records before you judge a campaign.

Define the Conversions You Want to Track

Choose what counts as a result before installing tracking. Otherwise, it’s easy to measure whatever the software makes convenient.

Start with completed outcomes:

  • A lead is an accepted request, such as a successful checklist signup.
  • A sale is a confirmed purchase.
  • Button clicks, product views, and checkout starts help explain the journey, but they aren’t completed leads or sales.
Define The Conversions You Want To Track: What Counts As An X Website Conversion?; Clicks, Views, Checkout Starts; Interest Signals; Accepted Checklist Request = Lead; Confirmed Purchase = Sale; One Visitor Can Complete Both

Keep leads and sales separate, even when the same visitor completes both.

For the running example, imagine your website publishes cat-grooming advice, offers a free brushing checklist, and sells a printable grooming planner. The business, links, and figures below are illustrative.

In Google Analytics 4 (GA4), an event records an action such as a signup or purchase. Write a small tracking plan before touching any settings:

Business ActionSuccessful-Completion TriggerGA4 EventRequired ParametersConfirming Business Record
Request the brushing checklistThe form accepts and saves the requestgenerate_leadNone needed for a basic request count; an optional form_id can identify the checklist formSaved form entry or subscriber record
Buy the grooming plannerThe store confirms successful paymentpurchasetransaction_id, value, currency, and items for this setupPaid order and payment record
Define The Conversions You Want To Track: Connect X Conversion Events To Business Records; Saved Request; Generate_Lead; Optional: Form_Id; Paid Order; Purchase; Transaction_Id; Value; Currency; Items; Email Confirmation Is A Later Status

These event names follow Google’s recommended event definitions. Using the names doesn’t install anything; your website still needs to send the events.

An accepted checklist request also isn’t necessarily a confirmed email subscriber. If you use email confirmation, keep that later status in your subscriber records.

My rule is simple: the report should describe something you can find in the business. A lead should have a saved request behind it, and a sale should have a paid order.

Set up GA4 to Record Visits and Conversions

GA4 records website activity. Tagged links identify the promotion that brought a visit, and events record what happened during that visit.

The measurement chain is:

X link → website session → successful request or purchase → campaign report

You can start with standard GA4 and a spreadsheet. A paid reporting tool won’t fix a form that counts failed submissions as leads.

First, check whether your website already sends data to GA4 through an integration, analytics plugin, or Google Tag Manager—a tool for managing tracking code.

Then:

  1. Create or reuse a GA4 property, which holds your website’s analytics.
  2. Add or check its website data stream and find the measurement ID beginning with G-.
  3. Install the Google tag through one route: your website integration, Google Tag Manager, or direct code.
  4. Confirm coverage on the landing page, form completion page, product page, and checkout confirmation page.

I would use a supported website integration first. Google Tag Manager is useful when you need more control over when events fire, but it adds another place to maintain.

Before collection, configure your privacy notice, consent controls, and applicable opt-outs. Where consent is required for non-exempt cookies, those cookies must wait for consent. Make sure the controls actually govern the tags; a banner alone doesn’t do that. X’s notice and consent guidance explains the considerations for its tracking products.

Record Successful Checklist Signups

Send generate_lead when the form accepts the request, after validation and successful processing.

A click on “Send My Checklist” is too early. The email address could be invalid, or the form could fail while saving the request.

Use your form tool’s successful-submission integration if it has one. Set the GA4 event name to generate_lead, and limit it to the checklist form.

If you use Google Tag Manager and the form integration exposes a successful-submission event:

  1. Find that event in Tag Manager’s preview session after a valid submission.
  2. Create a Custom Event trigger matching its exact name.
  3. Attach it to a GA4 Event tag and set the tag’s event name to generate_lead.
  4. Test the tag, then publish your changes.
Record Successful Checklist Signups: When A Checklist Signup Becomes A Ga4 Lead; Button Click; Too Early To Count; Invalid Or Failed → No Lead; Request Accepted And Saved; Generate_Lead; One Completion Trigger; Refresh Or Direct Visit → No Extra Lead

The form’s internal success-event name can differ from the event name you send to GA4. What matters is that the trigger represents an accepted request.

If the form doesn’t expose a reliable success signal, ask its provider how to connect one.

A thank-you page needs the same care. Fire the lead event only when a completed submission has been confirmed, and prevent repeat collection for that submission. Opening the page directly or refreshing it must not create another lead.

I once found both a form-success action and its thank-you page connected to lead tracking on a digital-product site. The request was real, but the extra event wasn’t. I now choose one place to send the completed lead.

Finally, mark generate_lead as a key event in GA4’s event settings. A key event is an action you have identified as important to the business. This affects reporting from that point onward; it doesn’t install the event or rewrite historical results. GA4 marks purchase as a key event by default.

Record Confirmed Purchases and Revenue

For sales, I would use the store’s supported GA4 ecommerce integration rather than build a purchase tag from scratch.

Configure it to send purchase after confirmed payment, with:

  • transaction_id: the unique order number.
  • value: the purchased items’ value, reflecting discounts and excluding separately reported tax and shipping.
  • currency: the currency code, such as USD.
  • items: the products purchased, including an item ID or name, price, and quantity.
Record Confirmed Purchases And Revenue: Ga4 Purchase Tracking Needs Stable Order Ids; Order_A; Same Order Sent Again; Keep The Original Transaction_Id; Order_B; Different Order → Different Id; Reusing An Id Can Hide A Real Sale; Value Reflects

These fields follow Google’s purchase-event implementation. Their values must come from the actual order.

Give every order a unique, nonempty transaction ID. If the same order is sent again, retain its original ID. GA4 uses transaction IDs to deduplicate purchases, so reusing an ID for different orders can hide real sales.

If checkout happens on another domain you can track, install the same GA4 web-stream tag there and configure cross-domain measurement. This connects activity across the two domains. Check that redirects preserve Google’s _gl linking parameter, as described in its cross-domain requirements.

If an external checkout cannot connect purchases back to website visits, report checkout clicks separately and verify sales in order records. A checkout click is useful evidence of interest, but it isn’t a purchase.

UTMs are labels added to a link. They tell analytics which platform, promotion, and placement the link belongs to.

Use four labels consistently:

ParameterWhat It IdentifiesExample
utm_sourceThe platformtwitter
utm_mediumOrganic or paid distributionsocial
utm_campaignThe promotionbrushing_checklist
utm_contentThe individual post or placementchecklist_post_a

I would use lowercase values throughout. For a new setup, twitter is a practical source name for X, with social for organic links and paid_social for ads. If you already use another consistent source name, keep it rather than splitting your history because the platform changed its name.

For the checklist promotion, a complete tagged link looks like this:

https://example.com/brushing-checklist/?utm_source=twitter&utm_medium=social&utm_campaign=brushing_checklist&utm_content=checklist_post_a

Replace the example address with your landing-page URL. A campaign URL builder can assemble it for you.

Tag Every X Promotional Link With Consistent Utms: How To Label X Campaign Links With Utms; Utm_Source; Twitter; Utm_Medium; Social Or Paid_Social; Utm_Campaign; Brushing_Checklist; Utm_Content; Checklist_Post_A; Same Promotion. Different Placement

Keep the campaign fixed while changing the content value for each placement:

PlacementMediumContent Value
First organic checklist postsocialchecklist_post_a
Second organic checklist postsocialchecklist_post_b
Profile linksocialprofile
Checklist adpaid_socialchecklist_ad_a

Save each link in a register with columns for destination, source, medium, campaign, content, placement, and publication date. Reuse those values when scheduling posts.

If you’d rather not build the link register from scratch, use the Campaign Link Manager below. It creates a separate tagged URL for each placement and keeps the labels together for your next promotion.

Add UTMs before shortening a link, then test the published version. X wraps shared links through its own link service, so inspect the final destination and confirm that your parameters survive.

Use UTMs on incoming promotional links. Don’t add them to internal links between your articles and products, and never put names or email addresses in the values.

Add X Pixel Tracking for Paid Campaigns

For organic promotion, I would start with GA4 and UTMs. Add X Pixel when you need to send website outcomes back to X for advertising measurement and optimization.

The pixel has base code that initializes tracking and event code that sends specific actions. X recommends Pixel as the straightforward starting option for most advertisers.

Use the successful-completion triggers you already defined:

  1. Create or reuse the pixel in the advertising account’s Events Manager.
  2. Install the base code across your website through one route.
  3. Create a Lead event for accepted checklist requests.
  4. Create a Purchase event for confirmed planner orders.
  5. Connect each event to its matching completion trigger.

Pass the purchase value and currency dynamically from the order. Selecting those fields in X’s event-code template doesn’t make the order data appear.

Also preserve twclid, X’s ad-click identifier, through landing-page redirects. Give each completed action a stable, unique conversion_id so repeated delivery can be deduplicated.

X’s Conversion API sends events from a server instead of relying solely on the browser. I would leave it for later unless your store already provides a supported integration. If you use both Pixel and Conversion API, send the same conversion_id for the same action through both. X describes these requirements in its conversion-tracking best practices.

Test the complete journey before using the report to judge a campaign. Seeing a tag installed tells you very little about whether it records the right action.

Start with the published, tagged X link in a fresh browser session. Check that it reaches the right landing page and retains its UTMs. Repeat on your phone using X’s in-app browser.

For a detailed desktop check, connect your website through Google Tag Assistant to enable debug mode for your test browser. Open GA4’s DebugView and inspect the events as you complete the journey.

Test The Journey From An X Link To A Completed Action: Test X Conversion Tracking Before Trusting Reports; Published Link → Tagged Arrival; Invalid Email → 0 Leads; Valid Saved Request → 1 Lead; Thank-You Refresh → 0 Extra Leads; Abandoned Checkout

Run these checks:

TestExpected Result
Open the tagged checklist linkThe landing page loads and GA4 receives the visit
Submit an invalid email addressNo completed lead event
Submit one valid checklist requestOne generate_lead event and one saved request
Refresh or directly open the thank-you pageNo additional lead
Start checkout and leaveNo purchase event
Complete a test purchasePurchase data matches the paid test order
Revisit the order confirmationNo additional counted order or revenue

Open the purchase event and inspect its transaction ID, value, currency, and items. Check those against the store record.

For paid tracking, use X Pixel Helper and Events Manager to inspect the base pixel and completion events. An event reaching X proves collection. It doesn’t prove that X attributed it to an ad.

If events are missing or duplicated, check:

  • Tag coverage and the correct GA4 measurement ID.
  • Consent choices and browser blocking.
  • Whether the trigger represents success.
  • Duplicate installations or overlapping event triggers.
  • Redirects that remove tracking parameters.

Identify test submissions and orders so you can exclude them from business reporting. If you use Tag Manager, publish the tested changes and repeat the journey outside preview mode. Run these checks again after changing a form, checkout, redirect, or tracking integration.

Find X Traffic and Conversion Rates in GA4

Once tracking passes the tests, use GA4 to connect X-attributed sessions with leads, purchases, and revenue.

A session is a period of website activity. One person can have several sessions, so session totals aren’t unique visitor totals.

Compare Campaigns, Posts, and Landing Pages

Start in Traffic acquisition and change the main dimension to Session source / medium.

Find your tagged rows:

  • twitter / social for organic promotion.
  • twitter / paid_social for ads.

Keep those groups separate. Add Session campaign to compare promotions within each group. For lead counts, select generate_lead in the Key events column.

To compare individual posts, build a custom table in Explore using Free form. Filter Session source / medium to either twitter / social or twitter / paid_social.

Use Session campaign, Session manual ad content, and Landing page as rows. Add Sessions, Ecommerce purchases, and Purchase revenue as values. The content dimension shows your utm_content labels, and the landing page shows where each session began. Google documents these mappings in its manual-tagging reference.

Save a report or spreadsheet with:

  • Reporting period, campaign, content value, and landing page.
  • Sessions and successful lead-event counts.
  • Purchases and purchase revenue.
  • Separate lead and purchase session conversion rates.

Keep the full session total when calculating either rate. If you filter the entire report to generate_lead, you can remove sessions that didn’t produce a lead and spoil the denominator. Use event-specific metrics or separate report views instead.

Review older t.co / referral traffic separately. It can help you understand untagged traffic, but it cannot reliably identify which post brought each visit.

Label these results as X-attributed sessions, since GA4 can credit a direct return to an earlier source. I would use session reporting for regular campaign reviews and attribution reports to investigate a longer buying journey. Google’s explanation of attribution scope describes how those reports assign credit.

Calculate Each Conversion Rate Separately

For a session conversion rate, count sessions containing the outcome, then divide by all eligible sessions in the same group and reporting period.

Suppose one 30-day review contains:

  • 400 tracked sessions attributed to twitter / social.
  • 20 of those sessions with a successful checklist request.
  • Eight of those sessions with a planner purchase.
Calculate Each Conversion Rate Separately: Calculate X Lead And Purchase Rates Separately; 400 X-Attributed Sessions; Illustrative Review; 20 Lead Sessions; 20 ÷ 400 × 100 = 5%; 8 Purchasing Sessions; 8 ÷ 400 × 100 = 2%; Some Sessions Contain Both

Assume each lead session contains one accepted request and each purchasing session contains one $15 planner order. There are no discounts or refunds, and the product revenue excludes tax.

MeasureCalculationResult
Lead session conversion rate20 lead sessions ÷ 400 X-attributed sessions × 1005%
Purchase session conversion rate8 purchasing sessions ÷ 400 X-attributed sessions × 1002%
Product revenue8 orders × $15$120

The denominator stays at 400 for both rates.

In GA4, use Session key event rate for the specific outcome: generate_lead or purchase. The metric measures the share of sessions containing that key event, as defined in Google’s Traffic acquisition reference.

Calculate Each Conversion Rate Separately: X Purchase Reporting: Sessions, Orders, Revenue; Session-Count Example; 1 Purchasing Session; 2 Purchases; Article Revenue Example; 8 Orders × $15 = $120; Product Revenue; No Discounts Or Refunds; Tax

Don’t use the combined rate for all key events when you want a lead rate or purchase rate.

Keep event counts and converting sessions separate, too. Two purchases in one session mean two purchases and one purchasing session.

Some sessions may include both a checklist request and a purchase. Keep the 5% lead rate and 2% purchase rate separate rather than adding them into a customer conversion rate.

Why Do X Ads Manager and GA4 Show Different Results?

The tools answer different questions, so matching totals aren’t the test of a good setup.

GA4 connects recorded website activity to traffic sources. X Ads Manager credits results according to its advertising attribution rules.

For paid campaigns, save an Ads Manager view containing spend, link clicks, Lead conversions, Purchase conversions, and purchase conversion value.

Then check the main reasons for disagreement.

Why Do X Ads Manager And Ga4 Show Different Results?: Why X Ads Manager And Ga4 Totals Differ; X Ads Manager; May Credit Ad Views Or Engagement; Attribution Settings Matter; Ga4; Recorded Website Activity And Source Credit; The Same Order Can Appear

X logs a link click immediately. GA4 needs its website tracking to run, and the visitor may leave before that happens. Repeated clicks also need not create separate sessions. X’s explanation of analytics discrepancies describes this click-versus-arrival gap.

X can also credit conversions after an ad view or an engagement such as a like, without a website click. Check the post-view and post-engagement attribution windows on your conversion events. An X-attributed purchase therefore isn’t proof that the buyer visited through an X link.

Before investigating a difference, match:

  • Campaigns and completed-action definitions.
  • Reporting dates and time zones.
  • Currencies and revenue treatment.
  • Attribution settings and reporting date basis, where available.

Record those settings beside the results and allow reports to finish processing.

Why Do X Ads Manager And Ga4 Show Different Results?: Calculate X-Attributed Cost Per Lead And Roas; $60 Spend; 12 Attributed Leads; $120 Attributed Purchase Revenue; Illustrative X Ads Results; Cost Per Lead; $60 ÷ 12 = $5; Roas; $120 ÷ $60 = 2; $2

Keep X-attributed conversions and GA4 results side by side. Never add their totals together because the same order can appear in both. Use lead and order records to investigate missing or duplicated outcomes.

For each paid campaign, use spend and attributed outcomes from the same reporting period and attribution settings. Divide spend by attributed leads for cost per lead, and divide attributed purchase revenue by spend for return on ad spend, or ROAS.

For illustration, if X reports $60 in spend, 12 attributed leads, and $120 in attributed purchase revenue:

  • X-attributed cost per lead: $60 ÷ 12 = $5.
  • X-attributed ROAS: $120 ÷ $60 = 2.

Label the attribution source. A ROAS of 2 means two dollars of attributed revenue per advertising dollar. It says nothing about what remains after product costs, fees, refunds, and other expenses.

Use the Report to Decide What to Improve

A useful report should change your next action.

Compare each campaign with its intended outcome. A checklist promotion should earn its place through leads, while a direct planner promotion should be judged mainly on purchases and revenue.

Use The Report To Decide What To Improve: Find The Weak Point In Your X Conversion Journey; Clicks → Few Arrivals; Check Loading, Redirects, Consent, Tracking; Sessions → Few Accepted Requests; Check Offer Match, Form Errors, Mobile Usability

Then look for the point where the journey weakens:

What You SeeWhat to Check First
Plenty of X clicks but fewer recorded arrivalsLanding-page loading, redirects, consent behavior, and tracking
Checklist-page sessions but few accepted requestsWhether the post matches the offer, plus form errors and mobile usability
Product views but few checkout startsProduct explanation, price clarity, and the purchase button
Checkout starts but few purchasesPayment errors, unexpected charges, and mobile checkout
One post appears to convert betterWhether it uses the same destination and offer, and how many outcomes support the difference

To investigate the purchase journey, collect supporting ecommerce events such as view_item and begin_checkout. Compare those stages for X-attributed sessions, then break the results down by landing page and device.

For the brushing checklist, a post promising “a simple weekly brushing routine” should lead to a page that clearly offers that routine. If the page opens with a general grooming newsletter pitch, fix the mismatch before writing more posts.

Use The Report To Decide What To Improve: Improve X Results With A Clearer Offer Match; 1. Find The Mismatch; Weekly Brushing Routine; General Grooming Newsletter; 2. Align The Destination; Weekly Brushing Checklist; 3. Test One Change; Same Offer.

Compare post variants that lead to the same offer. Change one meaningful element at a time, such as the opening line or image, so the result gives you a useful next step.

Be cautious with small counts. One sale can reverse the apparent winner when neither post has produced many orders. Check the underlying sessions and outcomes before moving your whole schedule behind a percentage.

I would start with a weekly review. Save the report and link register, then record one action: repair the form, simplify checkout, or test a clearer post. More reporting earns its keep only when it helps you make a better decision.

What Next?

Tag your next X link and follow it through one successful signup or test purchase. Check the saved business record beside the analytics event before expanding the setup.

Use the social buttons to share this guide when the conversation turns from X engagement to actual business results.

Which gap is hardest for you to measure: clicks becoming visits, visits becoming leads, or leads becoming sales? Share your answer in the comments, and bring any setup questions too.

Share this post with your friends & followers:
Abhishek is a data scientist by day & an online entrepreneur by night. He is known for his ability to simplify complex concepts and make them accessible to a wider audience. He started Passive Book to share his insights and experiences on how to effectively build an online business, which has quickly become a go-to resource for anyone looking to bootstrap an online business from scratch.

Leave a Comment

Build an Online Business 
Without Quitting Your Job

Join 10,000+ solopreneurs building six-figure online businesses from scratch with limited time & tight budgets using smart systems & AI automations.
Optin Form - Main

Free Bonus: Get access to our AI workflows & cheat sheets
Person sitting with laptop in home office environment with launching rocket, coffee mug, sleeping dog, bookshelf, and house plant illustrating work-from-home online business lifestyle. Decorative image.
Thank you for sharing

Follow Us On: