Blog

How to track conversions on your website

Most website owners obsess over traffic. They check visitor counts daily, celebrate when a blog post gets a spike in pageviews, and worry when the numbers dip. But traffic alone tells you almost nothing about whether your website is working. A site that gets 50,000 visitors a month and zero signups is not performing better than one that gets 2,000 visitors and 100 paying customers.

Conversion tracking is how you close that gap between "people visited" and "something valuable happened." It is the practice of defining the actions that matter to your business, measuring how often they occur, and connecting those actions to the traffic sources, pages, and behaviors that drive them.

This guide walks through the entire process — from understanding what a conversion is, to setting up tracking, to calculating rates, to attributing revenue. Whether you are running a SaaS product, an e-commerce store, or a content site with a newsletter, the principles are the same.

What a conversion actually is

A conversion is any action a visitor takes that moves them closer to becoming a customer — or that delivers value to your business directly. The word "conversion" simply means that someone converted from a passive visitor into an active participant.

The most obvious conversion is a purchase. Someone visits your online store, adds a product to their cart, enters payment information, and completes the transaction. That is a conversion. But conversions extend far beyond purchases.

A signup is a conversion. Someone lands on your SaaS homepage, reads about your product, clicks "Start Free Trial," fills in their email and password, and creates an account. A form submission is a conversion. A visitor on a B2B website fills out a contact form requesting a demo. A download is a conversion. Someone reads your blog post and downloads the PDF checklist you offer at the bottom. A click is a conversion. A visitor on your landing page clicks the "Book a Call" button that takes them to your scheduling tool.

Conversions are defined by you based on what matters to your business. There is no universal list. A conversion for a SaaS company is different from a conversion for a local restaurant is different from a conversion for a nonprofit. The key is specificity: you need to decide, before you start tracking, exactly which actions count and why.

Why tracking conversions matters more than tracking pageviews

Pageviews tell you how many times pages were loaded. That is it. They do not tell you whether anyone did anything useful on those pages. A blog post can get 10,000 pageviews and generate zero revenue. A pricing page can get 500 pageviews and generate $50,000 in new subscriptions. Without conversion tracking, both of those pages look equally "successful" in your analytics dashboard.

Conversion tracking shifts your focus from vanity metrics to business outcomes. Instead of asking "how many people visited my site?" you start asking "how many people signed up? How many purchased? Which pages led to those actions? Which traffic sources brought the people who actually converted?"

This shift changes how you make decisions. Without conversion data, you might double down on a blog post that gets lots of traffic but produces no signups. With conversion data, you might discover that a quiet product comparison page with 200 monthly visitors has a 12% conversion rate — and decide to send more traffic to it instead. Our guide on how to improve your website conversion rate covers what to do once you have this data.

Conversion tracking also lets you calculate return on investment for your marketing spend. If you know that visitors from Google Ads convert at 2.5% and your average customer is worth $200, you can calculate exactly how much you can afford to pay per click. Without conversion data, ad spending is guesswork.

Types of conversions: macro vs. micro

Not all conversions carry the same weight. It is useful to distinguish between macro-conversions and micro-conversions because they serve different purposes in your tracking setup.

Macro-conversionsare the primary actions that directly drive revenue or directly fulfill your website's main purpose. For an e-commerce store, the macro-conversion is a completed purchase. For a SaaS product, it is a paid subscription or a free trial signup that leads to payment. For a B2B company, it is a qualified lead submission or a booked demo that turns into a deal.

Micro-conversions are smaller actions that indicate interest and intent. They are steps along the path toward a macro-conversion. Email newsletter subscriptions are micro-conversions — someone is interested enough to give you their email address, but they have not purchased yet. Adding a product to a cart is a micro-conversion. Downloading a PDF guide is a micro-conversion. Watching a product demo video is a micro-conversion. Clicking from a blog post to a pricing page is a micro-conversion.

You should track both types. Macro-conversions tell you how much value your website is generating. Micro-conversions tell you how people are progressing toward that value. If your macro-conversion rate drops, micro-conversion data helps you pinpoint where in the journey people are falling off. If you see a spike in micro-conversions (like a surge in email signups) without a corresponding increase in macro-conversions, it might indicate that your nurture or follow-up process needs work.

A practical approach is to define one or two macro-conversions and three to five micro-conversions. More than that, and you risk drowning in data without gaining clarity. Fewer than that, and you will not have enough signal to understand what is happening between a first visit and a purchase.

How conversion tracking works

At a technical level, conversion tracking relies on recording specific events that happen on your website and associating them with the visitors who triggered them. There are several common methods.

Goal-based trackingis the simplest approach. You define a goal in your analytics tool — for example, "a visitor reaches the /thank-you page" — and the tool counts how many visitors complete that goal. This works well for conversions that end with a specific page load, like a purchase confirmation page or a signup success page. The limitation is that it only works for conversions that involve navigating to a new URL.

Event-based tracking is more flexible. Instead of tracking page loads, you track specific interactions: a button click, a form submission, a video play, a file download. Your website sends an event to your analytics tool whenever the interaction occurs. This is how most modern conversion tracking works because many important actions (like clicking "Add to Cart" or submitting a form that does not redirect) happen without a page change.

Server-side tracking records conversions on your backend rather than in the browser. When a user submits a form, your server processes the submission and sends a conversion event to your analytics tool via an API. This approach is more reliable because it does not depend on JavaScript running in the browser — ad blockers and script errors cannot prevent it. It is particularly useful for tracking purchases, where you want the conversion to be recorded only after the payment actually succeeds.

Most websites use a combination of these methods. Page-load goals for simple thank-you page conversions, event tracking for interactive elements like button clicks and form submissions, and server-side tracking for critical conversions like purchases where accuracy matters most.

Step by step: setting up conversion tracking

Here is how to get conversion tracking running from scratch, regardless of which analytics tool you use.

Step 1: Define your conversions. Write down every action on your website that indicates business value. Then rank them. Your primary conversion should be the one most directly tied to revenue — a purchase, a paid signup, a qualified lead submission. Your secondary conversions are the micro-conversions that indicate progress: email signups, content downloads, product page visits, add-to-cart actions.

Step 2: Install your analytics tool. Add the tracking script to every page on your website. Most analytics tools provide a small JavaScript snippet you paste into your site's head tag or install as a package. Make sure the script loads on every page — missing it on even one page creates blind spots in your data.

Step 3: Set up goal or conversion events. In your analytics tool, create a conversion for each action you defined in step one. For page-load conversions, specify the URL (like /signup/success or /order/confirmation). For event-based conversions, you will need to add event tracking code to the relevant elements on your site.

Step 4: Add event tracking code. For each interactive conversion (button click, form submission, video play), add a small piece of code that fires an event when the action occurs. In sourcebeam, this is as simple as calling a trackGoal function with the event name when the action happens. Most analytics tools follow a similar pattern — a function call with an event name and optional properties.

Step 5: Test everything. Go through each conversion action yourself and verify that the event appears in your analytics dashboard. Click the buttons, submit the forms, complete a test purchase. Check that each event fires exactly once (not zero times, not twice). Test on both desktop and mobile. Test in different browsers. A tracking setup that you have not tested is a tracking setup you cannot trust.

Step 6: Wait for data, then validate. After a few days of real traffic, compare your analytics conversion numbers against your actual records. If your analytics says 47 people signed up this week but your database shows 52 new accounts, something is off — maybe the tracking script is not loading for some visitors, or maybe some signups happen through a path you did not instrument. Investigate and fix any discrepancies early.

How to calculate your conversion rate

The formula is straightforward: take the number of conversions, divide by the number of visitors, and multiply by 100 to get a percentage.

If 8,000 people visit your website in a month and 240 of them sign up, your conversion rate is 240 divided by 8,000, which equals 0.03, which equals 3%.

A few important nuances. First, use unique visitors as the denominator rather than sessions or pageviews. If one person visits your site five times before signing up, that is one conversion from one visitor — not one conversion from five sessions. Using sessions deflates your conversion rate artificially.

Second, you can (and should) calculate conversion rates at different levels of specificity. Your overall site conversion rate is useful as a top-level health check, but it obscures important details. A per-page conversion rate tells you which pages are most effective at driving action. A per-source conversion rate tells you which traffic channels bring visitors who actually convert. A per-device conversion rate reveals if mobile visitors are having a worse experience than desktop visitors.

Third, conversion rate is meaningful only with enough volume. Fifty visitors and two conversions gives you a 4% conversion rate, but that number is unstable — two more conversions would double it to 8%. Generally, you want at least a few hundred visitors before drawing conclusions from a conversion rate. For statistically meaningful comparisons (like before/after a change), you need even more.

What good conversion rates look like

"Good" depends entirely on what you are measuring, your industry, your price point, and the type of page. But benchmarks give you a starting reference.

For e-commerce purchase conversion rates, 1.5% to 3.5% is typical. Fashion and apparel tend toward the lower end. Food and consumables tend toward the higher end because purchase intent is strong and price points are low. Luxury goods convert at well under 1% because the decision takes longer and involves more consideration.

For SaaS free trial signups, 3% to 7% is a common range for visitor-to-trial conversion. Trial-to-paid conversion rates vary dramatically depending on whether you require a credit card upfront (which reduces trial starts but increases trial-to-paid rates) or not (which increases trial starts but reduces trial-to-paid rates).

For B2B lead generation (form submissions, demo requests), 2% to 5% is typical. Higher-commitment conversions like demo bookings convert at lower rates than lower-commitment ones like whitepaper downloads.

For dedicated landing pages — single-purpose pages built for a specific campaign with a single call to action — 5% to 15% is common, and well-optimized pages can reach 20% or higher. These pages convert better because the traffic is targeted and the page has exactly one job.

For email signup forms, conversion rates range from 1% to 5% for embedded forms (in a sidebar or at the end of a blog post) and 3% to 10% for pop-ups and dedicated landing pages. The value of the offer matters enormously — "subscribe to our newsletter" converts worse than "get our free 20-page guide to X."

The most important comparison is your own conversion rate over time. If you were at 1.8% last month and you are at 2.3% this month, that is real progress regardless of what the industry average says.

Tracking conversions by traffic source

Not all traffic is created equal. A thousand visitors from a well-targeted Google search are worth far more than ten thousand visitors from a viral social media post where nobody was looking for your product. Tracking conversions by traffic source reveals which channels bring people who actually take action.

The main traffic sources to segment by are: organic search (people who found you through Google or Bing), paid search (people who clicked your ads), social media (organic and paid separately), referral (people who clicked a link on another website), email (people who clicked a link in your email campaigns), and direct (people who typed your URL or used a bookmark).

When you break down conversion rates by source, patterns emerge quickly. You might find that organic search converts at 4% while social media converts at 0.5%. That does not necessarily mean social media is useless — it might be excellent for awareness and micro-conversions like email signups — but it means you should not expect the same direct purchase rate from social visitors as from search visitors.

This data directly informs budget allocation. If you are spending $5,000 per month on Facebook Ads that convert at 0.8% and $3,000 per month on Google Ads that convert at 3.2%, the math is clear. Each dollar spent on Google Ads is producing roughly four times as many conversions. You might decide to shift budget, or you might decide to improve the landing page that Facebook traffic sees to close the gap — but either way, you need the per-source conversion data to make that decision.

UTM parameters make source tracking more granular. By tagging your links with utm_source, utm_medium, and utm_campaign parameters, you can see conversion rates not just by channel but by specific campaign, ad group, or even individual ad. This turns your analytics from a high-level overview into a detailed performance report for every marketing initiative you run.

Tracking conversions by landing page

The page where a visitor first arrives sets the trajectory for their entire session. A landing page that immediately communicates value and relevance leads to exploration and conversion. A landing page that confuses or disappoints leads to a bounce.

Tracking conversion rates by landing page tells you which entry points are working and which are leaking potential customers. You might discover that visitors who land on your product comparison page convert at 8% while visitors who land on your homepage convert at 1.5%. That is actionable information — it tells you the comparison page does a better job of matching visitor intent and guiding them toward a decision.

With this data, you can make targeted improvements. Pages with high traffic but low conversion rates are your biggest opportunities. They already have the audience — they just need to do a better job of converting it. Pages with low traffic but high conversion rates are candidates for more promotion — they already convert well, so sending more visitors to them will produce more results.

Landing page conversion data also helps you evaluate content strategy. If your blog posts bring in thousands of visitors but none of them convert, the issue might be the content topics (attracting the wrong audience), the lack of calls to action within the posts, or the disconnect between the blog content and your product. If certain blog posts do convert well, study what makes them different and replicate that approach.

Custom events: tracking specific interactions

Page-level tracking only tells you that someone visited a page. It does not tell you what they did on that page. Custom event tracking fills this gap by recording specific interactions that happen without a page navigation.

Common custom events include: button clicks (especially CTA buttons like "Start Free Trial" or "Add to Cart"), form submissions (contact forms, signup forms, search forms), video plays and video completion (did someone watch your product demo to the end?), file downloads (PDF guides, case studies, white papers), scroll depth (did visitors read past the first paragraph or did they bounce immediately?), and tab or accordion clicks (which features or FAQ questions are people most interested in?).

Setting up custom events typically involves adding a small snippet of code to the element you want to track. When a visitor clicks a button, the code fires an event that your analytics tool records. In sourcebeam, custom events are a core feature — you define an event name, trigger it from your code when the action happens, and it shows up in your dashboard alongside all your other conversion data. You can then see how many visitors triggered each event, what percentage of visitors that represents, and how those events correlate with your macro-conversions.

The principle with custom events is to track actions that indicate intent or engagement, not every possible interaction. Tracking that someone clicked "View Pricing" is valuable — it tells you they are considering buying. Tracking that someone hovered over a navigation menu item is not — it adds noise without insight. Start with the five to ten interactions most closely tied to your conversion funnel, and expand from there only if you have specific questions the data can answer.

Revenue tracking: connecting conversions to money

Knowing that 200 people converted last month is useful. Knowing that those 200 conversions generated $18,000 in revenue is far more useful. Revenue tracking connects your conversion data to actual dollars, which changes the way you evaluate your marketing and your website.

Without revenue tracking, all conversions look equal. A customer who buys a $15 item counts the same as one who buys a $500 item. A channel that produces 50 conversions worth $10 each looks better than one that produces 10 conversions worth $200 each — even though the second channel generates four times the revenue.

Revenue tracking works by passing the transaction amount along with the conversion event. When a purchase is completed, your system sends both the conversion event and the revenue value to your analytics tool. This allows you to see total revenue by traffic source, by landing page, by campaign, and by any other dimension you track.

For e-commerce sites, this means connecting your payment processor (like Stripe or Shopify) to your analytics. For SaaS products, it means tracking not just the initial signup but the subscription value over time. For lead generation businesses, it means assigning an estimated value to each lead based on historical close rates and average deal sizes.

Revenue data transforms your analytics from a traffic report into a business intelligence tool. Our guide on tracking website revenue goes deeper into connecting payments to analytics. You can calculate revenue per visitor for each traffic source, which tells you exactly how much each channel is worth. You can identify which landing pages generate the most revenue per session, not just the most conversions. You can calculate the actual return on ad spend by comparing revenue generated against ad costs.

Attribution: which touchpoint gets credit

Attribution is the process of deciding which marketing touchpoint deserves credit for a conversion. This matters because most visitors do not convert on their first visit. They might discover you through a blog post, come back a week later via an email link, and finally purchase after clicking a retargeting ad. Which of those three touchpoints caused the conversion?

Last-touch attribution gives all the credit to the last interaction before the conversion. In the example above, the retargeting ad gets 100% of the credit. This is the simplest model and the default in most analytics tools. Its weakness is that it ignores everything that happened before the final touch — the blog post that introduced your brand and the email that re-engaged the visitor get no credit at all.

First-touch attribution gives all the credit to the first interaction. The blog post gets 100% of the credit because it was the original discovery point. This model is useful for understanding which channels drive awareness, but it ignores the nurturing and re-engagement that actually closed the deal.

Multi-touch attribution distributes credit across all touchpoints. In a linear model, each touchpoint gets equal credit (33% each in the three-touch example). In a time-decay model, touchpoints closer to the conversion get more credit. In a position-based model, the first and last touches get the most credit (say 40% each) with the middle touches sharing the remainder.

For most small to mid-sized websites, last-touch attribution is a reasonable starting point because it is simple and actionable. As your marketing becomes more complex — with multiple channels, retargeting, email sequences, and content marketing all working together — multi-touch attribution becomes more important for understanding the full picture.

The key is to pick a model, be consistent, and make decisions based on relative performance rather than absolute numbers. If organic search and paid ads both show improving conversion rates under your chosen attribution model, the trend is informative even if the absolute numbers would shift under a different model.

Common conversion tracking mistakes

Not tracking conversions at all. This is the most common mistake, and it is the most costly. Plenty of websites have analytics installed but only look at pageviews and visitor counts. They have no idea which pages, sources, or campaigns actually produce business results. If you are not tracking conversions, you are flying blind — every marketing decision is a guess.

Tracking too many things. The opposite extreme is also a problem. When everything is a conversion — every button click, every page scroll, every form interaction — the data becomes noise. You end up with dozens of metrics and no clarity about what matters. Start with one primary conversion and two or three micro-conversions. You can always add more later when you have specific questions to answer.

Counting vanity conversions. A vanity conversion is an action that feels important but does not actually correlate with business value. Page time, social media shares, and newsletter signups that never lead to purchases can all be vanity metrics if they do not connect to revenue. The test is simple: if this conversion rate doubled tomorrow, would your revenue change? If the answer is not clearly yes, it might be a vanity metric.

Not testing the tracking setup. Broken tracking is worse than no tracking because it gives you false confidence. Events that fire twice per action inflate your numbers. Events that do not fire on mobile deflate your mobile conversion rate. A thank-you page that is accessible via a direct URL (without an actual conversion) creates phantom conversions. Test your tracking thoroughly and audit it regularly.

Ignoring the full funnel. Many websites only track the final conversion (the purchase or signup) and ignore everything that leads up to it. Understanding your full sales funnel is essential for diagnosing problems. When the conversion rate drops, they have no way to diagnose why. Was it fewer people reaching the pricing page? Was it a lower click rate on the signup button? Was it more people abandoning the checkout form? Without micro-conversion tracking at each funnel step, you cannot answer these questions.

Not segmenting the data. A site-wide conversion rate of 2.5% hides everything interesting. It might be 5% from organic search and 0.3% from social media. It might be 4% on desktop and 0.9% on mobile. It might be 6% for returning visitors and 1% for new visitors. Always look at conversion rates by source, by device, by page, and by visitor type. The averages lie — the segments tell the truth.

A conversion tracking setup checklist

If you are setting up conversion tracking on a new site — or auditing an existing setup — work through this checklist.

Define your primary conversion. What is the one action that most directly drives revenue? Write it down. This is the number you will track most closely and optimize for first.

Define two to four micro-conversions. What smaller actions indicate that a visitor is moving toward the primary conversion? Email signup, add-to-cart, pricing page visit, demo video play — pick the ones that matter most for your funnel.

Install your analytics tool on every page. Verify the script loads correctly on your homepage, your blog posts, your product pages, your checkout pages, and any other templates. Missing pages create data gaps.

Set up goal or conversion tracking for your primary conversion. Whether it is a thank-you page URL or a custom event, make sure your analytics tool is recording it.

Add custom event tracking for micro-conversions. Instrument button clicks, form submissions, and other interactive events with event tracking code.

Tag your marketing links with UTM parameters. Every link in your email campaigns, social media posts, and ads should include utm_source, utm_medium, and utm_campaign so you can see conversion rates by campaign.

Connect revenue data if possible. If you sell products or subscriptions, connect your payment processor to your analytics so conversions carry dollar values. This lets you see revenue by source and by page, not just conversion counts.

Test every conversion event. Go through each conversion action yourself. Check that the event fires exactly once. Check on mobile and desktop. Check in multiple browsers. Verify the data appears in your analytics dashboard.

Set up a weekly review cadence. Pick a day each week to review your conversion rates by source, by page, and by device. Look for trends: is the rate improving or declining? Are there anomalies that need investigation? Consistent review turns data into decisions.

Validate against your actual records. After a week of real traffic, compare your analytics conversion counts against your database, your payment processor, or your CRM. If the numbers do not match, find and fix the discrepancy.

Conversion tracking is not a one-time setup. Your website changes, your funnels evolve, new pages get added, old ones get removed. Audit your tracking setup quarterly to make sure everything is still firing correctly and that new conversion points are being captured.

sourcebeam makes conversion tracking simple — define goals, track custom events, connect Stripe for revenue attribution, and see exactly which pages and traffic sources drive real results. Try it free