Sub topic 14
Measure visits and conversions
This chapter covers how to measure whether your landing page works. You will install an analytics tool, define a conversion, check that it fires, and read the numbers. It assumes you have a published or previewable page with a lead form (see the earlier chapters on the call to action and form). It also assumes you know your campaign goal and have UTM-tagged links (see the previous chapter). The examples use Google Analytics 4 (GA4) terms. Other tools such as Plausible, Matomo, or the builder's built-in analytics use similar ideas under different names.
What you are measuring
Two numbers drive almost every landing page decision:
- Visits (sessions): how many times people arrived at the page.
- Conversions: how many of those visits ended with the action you chose as the campaign goal, such as a submitted lead form.
Dividing one by the other gives the conversion rate. If 40 of 800 sessions produce a lead, the rate is 5%.
Traffic by itself says little. A page with 5,000 visits and 10 leads is doing worse than a page with 500 visits and 40 leads. Decide your conversion event first, then work backwards to what the tool must record.
Choose the conversion event
Pick one primary conversion that matches the single goal from the start of the tutorial. Common choices:
| Goal | Conversion event | How it is usually detected |
|---|---|---|
| Collect leads | Form submitted | Thank-you page view, or a form submit event |
| Sell a product | Purchase completed | Order confirmation page or checkout event |
| Book a call | Booking confirmed | Redirect to a scheduler's confirmation page |
| Download a file | Download clicked | Click event on the file link |
Button clicks are a weak signal for lead goals. A visitor can click "Sign up", see an error, and leave. A submission that reaches a confirmation state is much closer to a real lead.
Install the tracking code
Most builders offer one of two routes:
- A built-in integration field. You paste a measurement ID (for GA4 it looks like
G-XXXXXXXXXX) into the site or page settings, and the builder inserts the script for you. - A custom code area. You paste the full tag into the page's head section. Use this if the builder has no integration field, or if you want a tag manager.
Follow these rules:
- Install the tag once. A builder integration plus a pasted tag usually double-counts every visit.
- Install it on the landing page and on the thank-you page, if they are separate pages.
- Use one analytics property for the page so that all your campaign data stays in one report.
If you use a tag manager such as Google Tag Manager, install only its container snippet on the page. You then add the analytics tag and its triggers inside the manager, and changes do not require editing the page.
Track the conversion
There are two reliable ways to record a form conversion. The first is better for most builders.
Option 1: a thank-you page
After submission, the form redirects to a page such as /thank-you. In your analytics tool, mark a view of that page as a conversion (in GA4, create an event from the page view with a condition on the page path, then mark it as a key event).
Strengths: it needs no code, and it fires only when the submission succeeded. Weaknesses: visitors who open the thank-you URL directly, or reload it, are counted again. Set the page to noindex and do not link to it anywhere.
Option 2: a form event
If the form shows an inline success message and stays on the same page, send an event when it succeeds. The snippet below uses the generate_lead event name that GA4 recommends for lead forms. It assumes the GA4 tag is already installed, so gtag exists.
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('form');
if (!form || typeof gtag !== 'function') {
return;
}
form.addEventListener('submit', function () {
gtag('event', 'generate_lead', {
form_id: 'spring_sale_signup'
});
});
});This fires when the browser submits the form. If your builder validates fields with its own script, or the submission can fail on the server, the event can fire for a lead that was never saved. Many builders expose a "form success" hook or event, which is more accurate. Use it where available.
Whichever option you choose, name the event once and keep the name stable. Renaming it later splits your history into two series.
How the data flows
The UTM values in the link travel with the session, which is why the conversion in the final report can be grouped by campaign. If the UTM parameters are missing or inconsistent (Email in one link and email in another), the report splits one source into several rows.
Verify before you trust it
Never launch without testing the tracking. Run this check:
- Open your tracking tool's real-time or debug view.
- In a private browser window, visit the page using a UTM-tagged link.
- Confirm one session appears with the correct source, medium, and campaign.
- Submit the form with a test entry.
- Confirm exactly one conversion event appears.
- Repeat on a phone. Mobile browsers sometimes block scripts that desktop allows.
Also check that the lead arrived at the form destination, such as your email or CRM. Analytics and the form's own submission log should agree. If analytics shows 30 conversions and the form inbox has 22 leads, something is double-firing or counting failed submissions.
Read the report
For a campaign page, the questions are practical. Look at these in order:
- Sessions by campaign and source. Which links send traffic?
- Conversion rate by source. A source with high traffic and a low rate is a candidate for a better-matched message or audience.
- Device split. If mobile has 70% of sessions but a much lower conversion rate than desktop, check the responsive layout and the form on small screens.
- Engagement. Low engagement time on a page that is meant to be read can indicate a mismatch between the ad and the headline.
Wait for enough data before drawing conclusions. A conversion rate based on 12 visits can swing wildly with one extra lead. As a rough guide, avoid decisions based on fewer than a few dozen conversions per variant.
Common errors
- Double-counting. Both an integration and a pasted tag are installed. Real-time view shows two sessions per visit.
- Self-traffic. Your own test visits inflate the numbers. Exclude your IP address or filter internal traffic, or note the test window and ignore it.
- Conversion on page load. The event is attached to the thank-you page, but the page is reachable from the form page without submitting. Check the redirect path.
- Lost UTM values. A redirect (for example, from
httptohttpsor a short link) drops the query string. Test the full path with a tagged link. - No consent handling. If your region requires consent before analytics cookies, tracking may be blocked until the visitor accepts. The next chapter covers this, and it affects the numbers you see here.
Exercise
Your form shows an inline "Thanks, we'll be in touch" message and does not redirect. A teammate suggests marking a page view of /thank-you as the conversion. Why will this not work, and what are two better options?
Show answer
There is no /thank-you page view, because the visitor never leaves the landing page, so the conversion would never be recorded. Better options: send an analytics event (such as generate_lead) from the form's success hook, which fires only when the submission succeeded; or change the form to redirect to a separate thank-you page and mark a view of that page as the conversion. A plain submit listener is a third option, but it can count failed submissions.
Exercise
Analytics reports 30 conversions for the week, but your form inbox holds 22 leads. Name two likely causes and one way to find out which applies.
Show answer
Likely causes: the conversion event fires twice for some submissions (for example, a duplicate tag), or it fires on form submit even when validation or the server rejects the entry. To find out, open the real-time or debug view, submit one test entry, and count the events. Two events means double-firing. One event on an entry that the form rejects means the trigger is too early.