How to Set Up Conversion Tracking on a Landing Page
How to Set Up Conversion Tracking on a Landing Page
If you can't measure conversions, you can't improve them. And if your tracking is sloppy, every optimization you make is guesswork dressed up as data.
This tutorial walks you through setting up conversion tracking on a landing page from scratch. By the end, you'll have GA4 events firing correctly, ad platform conversions reporting back to Google Ads and Meta, and a sanity check process so you actually trust the numbers.
No fluff. Just the steps.
Step 1: Define what counts as a conversion
Before touching any code, write down the exact action you want to track. "Sign up" is too vague. Be specific:
- A user submits the email form on
/signup - A user clicks the "Start free trial" button in the hero
- A user reaches
/thank-youafter checkout
Pick one primary conversion per page. You can track micro-conversions too (scroll depth, video plays, secondary CTA clicks), but the primary one is what your campaigns optimize against.
If you skip this step, you'll end up with twelve events firing on every page and no idea which one matters.
Step 2: Install Google Tag Manager
You can hardcode tags into your page, but Google Tag Manager (GTM) saves you from editing the codebase every time you add a pixel. Install it once, manage everything from one dashboard.
- Create a GTM container at tagmanager.google.com
- Copy the two snippets it gives you
- Paste the first into the
<head>of your landing page - Paste the second immediately after the opening
<body>tag - Publish the container (even empty, you need an initial version)
If you're using Webflow, Framer, Carrd, or any builder, they all have a custom code section for this. Paste, save, publish.
Step 3: Set up GA4
Google Analytics 4 is the foundation. Most ad platforms can pull conversion data from GA4, which means you set things up once and reuse the events.
In GTM:
- Click Tags then New
- Choose Google Analytics: GA4 Configuration
- Paste your GA4 Measurement ID (starts with
G-) - Set the trigger to All Pages
- Save and publish
Open GA4 in Realtime mode, load your landing page, and confirm the page view shows up. If nothing appears after 30 seconds, your container ID is wrong or GTM isn't loading. Check the source of your live page and look for gtm.js.
Step 4: Track the conversion event
Now the part most people get wrong. You need to fire a custom event when the conversion happens, not just track page views.
For form submissions
If your form redirects to a thank-you page after submit, the easiest path is a page view trigger:
- In GTM, create a new tag: GA4 Event
- Configuration tag: select your GA4 setup tag
- Event name:
signup_complete(use snake_case, lowercase) - Trigger: Page View with condition
Page Path equals /thank-you
If your form submits via AJAX without a redirect, you need a different trigger. Use the Form Submission trigger built into GTM, or push a custom event from your form's success callback:
window.dataLayer = window.dataLayer || [];
dataLayer.push({ event: 'signup_complete' });
Then in GTM, create a Custom Event trigger with the event name signup_complete and attach it to your GA4 event tag.
For button clicks
- Enable click variables in GTM (Variables then Configure then check all click variables)
- Create a new trigger: Click - All Elements
- Fire on: Some Clicks, where
Click ID equals hero-cta(or whatever ID your button has) - Attach this trigger to a new GA4 Event tag with event name
cta_click
If your button doesn't have an ID, give it one. Don't rely on click text or class names. Those change.
Step 5: Mark the event as a conversion in GA4
GA4 doesn't automatically treat events as conversions. You have to flag them.
- Open GA4
- Go to Admin then Events
- Wait until your event shows up (can take 24 hours, or trigger it yourself a few times)
- Toggle Mark as key event
Once it's a key event, GA4 starts counting it in conversion reports and exposing it to linked ad platforms.
Step 6: Connect Google Ads
If you're running Google Ads to your landing page, link GA4 to your Ads account so conversions flow through.
- In GA4 Admin, go to Google Ads links
- Click Link and select your Ads account
- Enable personalized advertising and auto-tagging
- In Google Ads, go to Tools then Conversions
- Click New conversion action then Import then Google Analytics 4 properties
- Select your key event and import it
Now bid strategies like Maximize Conversions actually have signal to optimize against. Without this link, you're paying for clicks blindly.
Step 7: Add the Meta Pixel (if you run Meta ads)
For Facebook and Instagram traffic, you need the Meta Pixel plus the Conversions API for reliable tracking.
In GTM:
- Create a new tag using the Facebook Pixel template from the Community Gallery (search "Facebook Pixel" in tag templates)
- Paste your Pixel ID
- Set the event name to
LeadorCompleteRegistration(use Meta's standard events when possible) - Use the same trigger you built in Step 4
For the Conversions API, the cleanest setup is server-side. If you're on Shopify, WordPress with a plugin, or using a CDP like Segment, the integration is one click. Otherwise, look at Stape or Google's server-side GTM. Browser-only pixel tracking loses 20 to 40 percent of conversions to ad blockers and iOS privacy, depending on your audience.
Step 8: Test everything before you trust it
This is the step everyone skips. Then they wonder why their numbers don't match across platforms.
Use GTM Preview mode. Click Preview in GTM, enter your landing page URL, and walk through the conversion flow. Watch the Tags tab to confirm each tag fires at the right moment.
Check GA4 DebugView. Install the GA Debugger Chrome extension, then load your page. Every event shows up in DebugView in real time with all its parameters.
Use the Meta Pixel Helper. Chrome extension. Tells you which Pixel events fired and flags any errors.
Check Google Tag Assistant. Confirms your Google Ads conversion tag is firing on the right URL.
If any of these don't show what you expect, fix it now. Tracking bugs compound. A week of bad data is worse than a week of no data.
Step 9: Build a simple dashboard
Once events are flowing, set up a quick way to monitor them. In GA4, create an exploration with:
- Conversion event count by source/medium
- Conversion rate (key events / sessions) by landing page
- Conversion event count by device category
Check it weekly. If conversions drop suddenly, it's usually a tracking break, not a marketing problem. Catch it early.
Common mistakes that ruin your data
Firing the conversion on every page load. If your "thank you" page is reachable directly, people bookmark it or refresh, and you double-count. Add a query parameter like ?status=success and trigger only when that parameter is present.
Not deduplicating across pixels. When you fire both a browser pixel and a server-side event, send the same event_id from both so Meta can deduplicate. Otherwise you double-count conversions.
Ignoring cross-domain tracking. If your form posts to a different domain (Stripe Checkout, Calendly, a separate billing app), GA4 treats it as a new session. Configure cross-domain tracking in your GA4 data stream settings.
Tracking without context. Pass UTM parameters through to your conversion event so you can segment by campaign later. The default GA4 attribution helps, but custom parameters give you flexibility.
What to do after tracking is live
Now you can actually optimize. Pull a week of data, find your highest-traffic page with the lowest conversion rate, and start fixing it. If you need a starting point, work through the conversion rate diagnostic checklist or audit your hero section against these conversion rules.
And once you're ready to test changes, run A/B tests without burning your traffic.
Tracking setup takes an afternoon. Tracking that's actually correct takes a couple of hours of testing on top. Don't skip the testing.
If you want a faster way to spot which landing page elements are killing conversions before you even open GA4, run your page through PagePulse. You'll get a UX audit in under a minute, with specific fixes ranked by impact. Paste your URL at pagepulse.page and find out what's leaking conversions on your page right now.