Conversion Tracking
20 minute read

How to Set Up Conversion Tracking: A Beginner's Step-by-Step Tutorial

Written by

Matt Pattoli

Founder at Cometly

Follow On YouTube

Published on
February 19, 2026
Get a Cometly Demo

Learn how Cometly can help you pinpoint channels driving revenue.

Loading your Live Demo...
Oops! Something went wrong while submitting the form.

You're spending money on ads, but do you actually know which ones are bringing in customers? If you're running paid campaigns without conversion tracking, you're essentially flying blind—making decisions based on guesses instead of data. Conversion tracking tells you exactly what happens after someone clicks your ad: Did they sign up? Make a purchase? Book a demo? Without this information, you can't optimize your campaigns, prove ROI, or scale what's working.

Think of it like this: imagine running a retail store where you could see people walking in, but you had no idea what they bought or if they bought anything at all. You'd have no clue which marketing efforts actually worked. That's what digital advertising looks like without proper tracking.

This tutorial walks you through setting up conversion tracking from scratch, even if you've never touched a tracking pixel before. By the end, you'll have a working system that captures the actions that matter most to your business and feeds that data back to your ad platforms for smarter optimization. Let's turn your marketing guesswork into measurable results.

Step 1: Define Your Conversion Goals Before Touching Any Code

Before you install a single line of tracking code, you need to know exactly what you're tracking. This might seem obvious, but many marketers jump straight to implementation without clearly defining what success looks like for their business.

Start by identifying the specific actions that indicate real business value. These aren't just any interactions—they're the moments that move someone closer to becoming a customer or generate revenue. For an e-commerce store, this is obviously a purchase. For a SaaS company, it might be a free trial signup or a demo request. For a service business, it could be a contact form submission or a phone call.

Here's where it gets strategic: distinguish between macro conversions and micro conversions. Macro conversions are your primary goals—the big wins like completed purchases or closed deals. Micro conversions are secondary actions that indicate interest and move people toward those bigger goals—things like email newsletter signups, PDF downloads, or video views.

Why track both? Because not everyone converts immediately. Someone might watch your product demo video today and purchase three weeks later. By tracking micro conversions, you can see which ads are generating interest even if they don't immediately drive sales. This gives you a more complete picture of what's working and helps you follow best practices for tracking conversions accurately.

Map your customer journey to understand where these conversions actually happen on your website. Walk through your site as if you were a customer. Where do people land after clicking an ad? What pages do they visit before converting? What's the URL of your thank-you page after someone completes a purchase or submits a form?

Document everything in a simple spreadsheet. For each conversion, record: the conversion name (be specific—"Product Purchase" not just "Conversion"), the URL where it happens, how it's triggered (page load, button click, form submission), and its business value. If you sell products at different price points, note that purchases have variable values. If you're tracking leads, estimate what a qualified lead is worth based on your close rate and average deal size.

Prioritize your list. You should end up with 3-5 conversion events ranked by importance. Don't try to track everything at once—start with what matters most and expand later. Your primary conversion should be the action that most directly generates revenue or qualified opportunities.

Verify success for this step: You should have a clear, written list of conversions with specific details about where and how each happens. If you can't explain exactly what you're tracking and why it matters, you're not ready to move to implementation.

Step 2: Install Your Base Tracking Pixels on Every Page

Now that you know what you're tracking, it's time to set up the foundation. Tracking pixels are small pieces of code that collect data about your website visitors and send it back to your ad platforms. Think of them as digital scouts that report back to headquarters about who's visiting and what they're doing.

Each ad platform has its own pixel: Meta Pixel for Facebook and Instagram ads, Google Tag for Google Ads, TikTok Pixel for TikTok ads, and so on. These base pixels need to be installed site-wide—on every single page of your website—because they collect general visitor data that your ad platforms use for targeting and attribution.

Here's where beginners often get overwhelmed: the thought of adding code to every page sounds complicated. This is where Google Tag Manager becomes your best friend. Instead of manually adding tracking codes to your website's HTML, you install one GTM container code, and then you can manage all your tracking pixels through a simple interface without touching your site's code again.

To set up Google Tag Manager, create a free account at tagmanager.google.com and create a container for your website. GTM will give you two code snippets—one goes in your site's header section, the other goes right after the opening body tag. If you're using WordPress, plugins like "Insert Headers and Footers" make this easy. If you're on Shopify, Wix, or Squarespace, they have built-in fields for adding GTM code. If you have a developer, send them these snippets—it's a five-minute task.

Once GTM is installed, add your ad platform pixels through the Tag Manager interface instead of hardcoding them. In GTM, create a new tag for your Meta Pixel (choose the Facebook Pixel template), paste in your Pixel ID from Meta Events Manager, and set it to fire on "All Pages." Repeat this process for Google Tag and any other ad platform pixels you need. For a deeper dive into Facebook-specific implementation, check out our guide on accurate Facebook conversion tracking.

The beauty of this approach? When you need to add new tracking or make changes, you do it in GTM's interface and publish the updates—no code changes required on your actual website.

Testing is critical at this stage. Install browser extensions like Meta Pixel Helper for Chrome or Google Tag Assistant to verify your pixels are working. Visit different pages on your site and check that the extensions show your pixels as "active" and firing correctly. These tools will flag common issues like missing pixels, duplicate installations, or incorrect setup.

Verify success for this step: Open your website in a browser with your pixel helper extensions enabled. Navigate to several different pages—your homepage, a product page, your contact page. All your base pixels should show as "active" on every page you visit. If you see any errors or if pixels aren't firing on certain pages, troubleshoot before moving forward. Your base tracking must be solid before you add conversion events on top of it.

Step 3: Create Conversion Events in Your Ad Platforms

With your base pixels installed and firing correctly, you're ready to tell your ad platforms exactly which actions you want to track as conversions. This is where you take that list of conversion goals from Step 1 and turn them into actual events that your ad platforms can measure and optimize toward.

Let's start with Meta (Facebook and Instagram). Navigate to Events Manager in your Meta Business Suite. You'll see your pixel listed—click on it, then look for the option to add events. Meta offers two approaches: standard events and custom events.

Standard events are predefined by Meta and include actions like Purchase, Lead, CompleteRegistration, AddToCart, and ViewContent. Use these whenever possible because Meta's algorithm is trained to optimize for them. If someone completes a purchase on your site, track it as a "Purchase" event. If they submit a lead form, use the "Lead" event. These standard events come with built-in optimization advantages.

Custom events are for tracking actions unique to your business that don't fit standard categories. Maybe you want to track when someone clicks a specific call-to-action button or downloads a particular resource. Custom events work, but they don't carry the same optimization power as standard events because Meta's algorithm has less historical data to work with.

For each conversion event you create, configure the important parameters. For purchase events, you'll want to pass the conversion value (the actual order amount) and currency. For lead events, you might assign an estimated value based on what a lead is typically worth to your business. This value helps ad platforms optimize for revenue, not just conversion volume. Understanding how marketing attribution platforms handle revenue tracking can help you set these values strategically.

Attribution windows are another crucial setting. This determines how long after someone clicks or views your ad a conversion can still be credited to that ad. The default is typically 7 days after a click and 1 day after a view. If you have a longer sales cycle—like B2B software where people research for weeks—consider extending the click attribution window to 28 days.

Now repeat this process in Google Ads. Navigate to Tools & Settings, then Conversions under the Measurement section. Click the plus button to create a new conversion action. Choose "Website" as the source, then select the type of conversion (purchase, submit lead form, etc.). Google will ask you to define how to track it—we'll handle the actual implementation in the next step, but for now, just set up the conversion action with the right category, value, and count settings.

One important decision: should you count every conversion or just one per click? For purchases, count every conversion—if someone buys multiple times, you want to track each sale. For lead form submissions, count only one per click—you don't want duplicate conversions if someone submits the same form twice.

Verify success for this step: Check your Events Manager in Meta and your Conversions dashboard in Google Ads. Each conversion event you defined in Step 1 should now exist in your ad platforms, configured with the right event type, value settings, and attribution window. They'll show as "unverified" or "no recent activity" at this point—that's expected. You haven't implemented the actual tracking yet. That's next.

Step 4: Implement Event Triggers on Your Website

This is where the magic happens—connecting your conversion events to actual user actions on your website. You've told your ad platforms what conversions matter. Now you need to make those events fire at the exact moment someone completes those actions.

Open Google Tag Manager and think about how each conversion happens. There are three main trigger types you'll work with: page view triggers (fires when someone lands on a specific page), click triggers (fires when someone clicks a specific button or link), and form submission triggers (fires when someone submits a form).

Let's start with the simplest scenario: thank-you page tracking. If someone lands on a thank-you page after making a purchase or submitting a form, you can track that conversion based on the page URL. In GTM, create a new trigger, choose "Page View," and set it to fire when the Page URL contains your thank-you page URL (like "/thank-you" or "/order-confirmation"). Be specific enough to avoid false triggers, but not so specific that variations break your tracking.

Now create a tag that fires when this trigger activates. For a Meta conversion, choose the Facebook Pixel template, select your pixel, choose "Track a Custom Event," and enter your event name (like "Purchase" or "Lead"). Under "Object Properties," you can pass additional data like the order value or product information. Set this tag to fire on your thank-you page trigger.

For Google Ads conversions, create a Google Ads Conversion Tracking tag, enter your Conversion ID and Conversion Label (you'll find these in your Google Ads conversion settings), and set it to fire on the same trigger. If you're running a Shopify store, our detailed walkthrough on Google Ads conversion tracking for Shopify covers platform-specific nuances.

What if your conversion doesn't involve a thank-you page? Maybe someone clicks a "Call Now" button or downloads a PDF without leaving the page. This requires click-based tracking. In GTM, create a click trigger that fires when someone clicks an element with a specific ID, class, or text. You might need to inspect your website's HTML to find the right identifier for the button you want to track.

Form submission tracking is trickier because you need to ensure the event fires after the form is successfully submitted, not just when someone clicks the submit button. GTM has a built-in form submission trigger that waits for the form to actually submit before firing. Use this instead of a simple click trigger to avoid tracking incomplete submissions.

Here's a critical detail for e-commerce: passing dynamic values. If you're tracking purchases, you don't want to send the same static value for every order. You need to pass the actual order amount. This typically requires pulling data from your website's data layer—a JavaScript object that contains information about the page and user actions. If you're on Shopify, WooCommerce, or similar platforms, they often push purchase data to the data layer automatically. You'll reference these data layer variables in your GTM tags.

For example, instead of setting a fixed conversion value of $50, you'd set it to a variable like {{transactionTotal}} that pulls the actual order amount from your data layer. This ensures accurate revenue tracking and helps ad platforms optimize for high-value customers, not just conversion volume.

Before you publish anything, use GTM's Preview mode. This is your testing environment where you can see exactly which tags fire on which pages and actions without affecting your live tracking. Click "Preview" in GTM, then navigate to your website. You'll see a debugging panel that shows every tag, trigger, and variable as you interact with your site.

Verify success for this step: In Preview mode, complete each conversion action on your site. Submit your lead form, click through to your thank-you page, or complete a test purchase. Watch the GTM debugger to confirm that the right tags fire at the right moments with the correct data. Only when everything works perfectly in Preview mode should you click "Submit" to publish your changes live.

Step 5: Validate Your Tracking with Real Test Conversions

Your tracking is live, but you're not done yet. The only way to truly know if everything works is to complete actual test conversions and verify they appear correctly in your ad platforms. This step catches issues that preview mode might miss.

Start by completing a real conversion on your website. If you're tracking purchases, make an actual test purchase (you can refund it later). If you're tracking form submissions, fill out and submit your lead form with test data. Use a different browser or incognito mode to ensure you're experiencing your site like a real visitor would.

Now check your ad platform dashboards. In Meta Events Manager, click on your pixel and view the "Test Events" tab. If your tracking is working, you should see your test conversion appear within seconds. Look for the event name, check that it matches what you intended to track, and verify that any values or parameters are passing correctly.

For Google Ads, navigate back to your Conversions dashboard. Recent conversions appear under the "Status" column. Google's reporting can be delayed by a few hours, so don't panic if you don't see your test conversion immediately. Check back after a few hours—it should appear with the correct conversion action name and value. If conversions aren't showing up as expected, our troubleshooting guide on Google Ads conversion tracking problems can help you diagnose common issues.

Pay attention to the details. Is the conversion value correct? If you made a $75 test purchase, does it show $75 in your tracking? Are product names or other parameters passing through as expected? Small discrepancies now can mean significant data problems at scale.

Common issues to troubleshoot: If conversions aren't appearing at all, double-check that your GTM container is published (not just previewed) and that your triggers are set up correctly. If you're seeing duplicate conversions—the same action tracked twice—you might have both GTM-based tracking and hardcoded pixels installed. Remove the duplicates. If conversion values are wrong or missing, review how you're passing dynamic data from your data layer. For persistent accuracy issues, learn how to approach fixing inaccurate conversion tracking.

Test multiple conversion types if you're tracking several different actions. Submit your contact form, complete a purchase, download a resource—whatever conversions you set up. Each one should appear correctly in the appropriate ad platform.

Here's something beginners often miss: test from different devices. Complete a conversion on mobile and another on desktop. Ad platform tracking can behave differently across devices, and you want to catch any device-specific issues before you're relying on this data for real campaign decisions.

Verify success for this step: Within 24 hours, all your test conversions should appear in your ad platform dashboards with accurate event names, correct values, and proper attribution. If something's not showing up or the data looks wrong, don't move forward until you've identified and fixed the problem. Your entire optimization strategy depends on accurate conversion data—it's worth taking the time to get this right.

Step 6: Connect Your Tracking to Your Full Customer Journey

You now have working conversion tracking, which puts you ahead of many advertisers. But there's a reality we need to address: pixel-based tracking alone doesn't capture the complete picture anymore.

Apple's iOS privacy changes have fundamentally altered how tracking works. When users opt out of tracking on iOS devices, pixels can't follow them across apps and websites. Browser-based cookie restrictions from Safari and Firefox further limit what pixels can see. Cross-device behavior—someone clicking an ad on their phone but converting later on their laptop—often goes untracked. The result? Your conversion data is likely incomplete, showing fewer conversions than are actually happening. Understanding pixel tracking alternatives for iOS users is becoming essential for accurate measurement.

This is where server-side tracking becomes important. Instead of relying solely on browser-based pixels that users can block, server-side tracking sends conversion data directly from your website's server to ad platforms. This method is more reliable because it doesn't depend on cookies or user consent in the same way client-side pixels do.

Setting up server-side tracking is more technical than what we've covered so far—it typically requires a server-side Google Tag Manager container and proper server infrastructure. But the accuracy improvement is significant, especially for iOS traffic and privacy-conscious users.

Beyond technical tracking improvements, consider what happens after someone converts. Someone fills out your lead form—great, your pixel tracked it. But did that lead actually become a customer? Did they generate revenue? This is where connecting your CRM data becomes critical.

Your ad platforms can tell you which ads drove form submissions, but they can't tell you which ads drove actual closed deals and revenue unless you connect that downstream data. When you integrate your CRM with your marketing data, you can see which campaigns generate qualified leads versus junk submissions, and which traffic sources produce customers with the highest lifetime value. Exploring cross-device conversion tracking solutions helps bridge these gaps in your customer journey data.

This is exactly what attribution platforms like Cometly are built to solve. Instead of relying on incomplete pixel data or disconnected systems, Cometly unifies touchpoints across your ad platforms, website, and CRM to show the complete customer journey. It captures every interaction—from the first ad click through multiple website visits to the final conversion and beyond to actual revenue.

Cometly's server-side tracking ensures you're capturing conversions that pixels miss, while its AI-powered attribution shows you which marketing touchpoints actually drive results. When someone interacts with three different ads across two platforms before converting, Cometly shows you the full path and attributes value appropriately—something single-platform reporting simply can't do.

The platform also syncs enriched conversion data back to your ad platforms, feeding their algorithms better information for optimization. When Meta or Google knows which conversions led to actual revenue, they can find more high-value customers instead of just optimizing for any conversion.

Verify success for this step: You can trace a customer from their initial ad click through their complete journey to closed revenue. You understand which conversions are leading to actual business outcomes, not just which ads are generating form fills or clicks. This level of visibility transforms how you allocate budget and optimize campaigns—you're no longer guessing which marketing efforts actually work.

Your Tracking Foundation Is Ready

You now have a working conversion tracking system that captures the actions driving your business forward. Let's recap what you've built: conversion goals clearly defined and prioritized, base pixels installed site-wide and firing correctly, conversion events created in your ad platforms with proper parameters, triggers configured in Tag Manager to fire at the right moments, test conversions validated across devices, and an understanding of how to connect tracking to your full customer journey.

Here's your quick-reference checklist to keep handy: Are your base pixels firing on every page? Are conversion events appearing in your ad platform dashboards when they should? Are conversion values passing correctly? Is your GTM container published (not just previewed)? Are you monitoring for tracking errors weekly?

That last point matters more than beginners realize. Tracking isn't a set-it-and-forget-it task. Websites change—someone updates a form, redesigns a checkout flow, or changes a thank-you page URL. Any of these changes can break your tracking without you noticing. Review your conversion data weekly. If you suddenly see a drop in tracked conversions but traffic is steady, investigate immediately. The longer tracking issues go undetected, the more optimization decisions you'll make based on incomplete data. Our guide on fixing conversion tracking gaps can help you identify and resolve these issues quickly.

As your campaigns scale and your marketing becomes more sophisticated, you'll quickly discover the limitations of basic conversion tracking. A customer might see your Facebook ad, click your Google ad a week later, visit your site directly three times, and finally convert. Which channel gets credit? Basic last-click attribution gives all the credit to that direct visit, completely ignoring the ads that introduced them to your brand.

This is when you need more sophisticated attribution to understand which touchpoints actually drive conversions across an increasingly complex customer journey. Multi-touch attribution examines every interaction and distributes credit appropriately, showing you the true impact of each marketing channel. Learning about attribution tracking for multiple campaigns becomes essential as you scale.

Ready to elevate your marketing game with precision and confidence? Discover how Cometly's AI-driven recommendations can transform your ad strategy—Get your free demo today and start capturing every touchpoint to maximize your conversions. See exactly which ads drive real revenue, feed better data to your ad platforms for smarter optimization, and make confident budget decisions based on complete customer journey visibility.

Start with the fundamentals you've learned in this tutorial, prove your tracking works, then level up to complete journey visibility. Your future self—the one making data-driven decisions and scaling profitable campaigns—will thank you for building this foundation correctly from the start.

Get a Cometly Demo

Learn how Cometly can help you pinpoint channels driving revenue.

Loading your Live Demo...
Oops! Something went wrong while submitting the form.