How-to guides
How to Set Up Dynamic Text Replacement for Landing Pages
Learn how dynamic text replacement works, get step-by-step setup instructions, and fix common problems to make landing pages feel more relevant.

Dynamic text replacement changes words on a landing page to match what a visitor searched or clicked. It turns one page into a version that adapts to the traffic source, so it feels like a direct answer to that visitor. This guide covers setup, which text to replace, common issues, and what to do next.
What dynamic text replacement does
A visitor clicks an ad that mentions "emergency plumber Dallas." If the landing page headline just says "Plumbing Services," the link between the ad and the page feels thin. Dynamic text replacement pulls a value from the ad click (like the keyword) and changes the headline to "Emergency Plumber Dallas." The page stays the same. Only the text you specify updates based on the link the visitor clicked. You control which parts of the page change and what triggers the change.
This runs on URL query parameters. When you build an ad, you add a parameter to the landing page URL. The page reads that parameter and swaps the text. If the parameter is missing, the page shows a default version you set. One landing page can feel tailored to dozens of search terms or audience segments.
Step by step: setting up dynamic text replacement
These steps work for any landing page builder that supports dynamic text. Later we cover how to do it in Leadpages.
- Pick the text you want to replace. Common choices are the main headline, a subheadline, or a call-to-action button. The headline is the most visible element and tends to affect relevance the most. Subheadlines and buttons can reinforce the message. Limit replacement to one or two key spots so the page still reads naturally and does not feel fractured.
- Choose the URL parameter name. Decide what the trigger will be, for example, a keyword from a search ad (
keyword), the ad group name (adgroup), or the traffic source (utm_source). Use all lowercase with no spaces. Keep names short and clear:keyword,service,program,location. - Plan the actual words you need. List the values you might pass and the exact text to show for each. For a plumber running ads for different services, the map might look like this:
- Parameter:
service - Value:
drain-cleaning→ text: "Drain Cleaning in Houston" - Value:
water-heater-repair→ text: "Water Heater Repair in Houston" - Value:
emergency-plumber→ text: "Emergency Plumber in Houston" If you have many variations, you can sometimes use the parameter value directly as the replacement text by adding a few words around it. Test how the result reads to a visitor.
- Parameter:
- Build your landing page with default text first. Write a headline that works for a general visitor. If nobody passes a parameter, this is what they see. For the plumber example, you might start with "Professional Plumbing Services." The default text also acts as a fallback. Keep it broad enough that the page still holds together when the dynamic text is missing.
- Set up the dynamic text rule in your page builder. In most tools, select a text element, open the settings panel, and look for an option labeled dynamic text, personalization, or query parameter. Enter the parameter name you chose. Some builders let you map specific values to custom phrases. If mapping is not available, pass the exact text you want to appear as the parameter value. Remember that spaces in URLs need to be encoded or replaced with hyphens.
- Enter the fallback text. This should match your default headline. When the page loads without the parameter, or the parameter is empty, the fallback shows instead. It keeps the page from showing blank space or a broken placeholder.
- Publish the page and test it. Open your live page URL in a browser and append
?followed by your parameter and value. For example:www.yoursite.com/plumbing?service=drain-cleaning. If your rule is set correctly, the headline should change to "Drain Cleaning in Houston." Test with several values and without any parameter to confirm the fallback works. Test on mobile too, since some ad platforms handle parameters differently on mobile clicks. - Connect your ads. In Google Ads, use ValueTrack parameters like
{keyword}in the final URL suffix or tracking template so the keyword the person searched appends to the landing page URL automatically. For Facebook ads, add the parameter manually to each ad's destination URL. Make sure each ad variation sends the value that matches the ad's message. Without this step, the page will always show the default text because no parameter is being passed.
How to do it in Leadpages
In the Leadpages builder, select the text widget you want to make dynamic. In the settings panel on the right, find the Dynamic Text toggle and turn it on. Enter the query parameter name you plan to use, such as service. Then add the default text that appears when the parameter is absent. If you want to map short codes to longer phrases, use the mapping option. For example, map drain to "Drain Cleaning in Houston" and heater to "Water Heater Repair." When you publish the page, Leadpages reads the URL and replaces the text on the fly. You do not need to edit any code.
If you are new to landing pages, you can start from a template and add dynamic text to it. For building new pages, the AI page builder can generate a starting layout, and then you apply dynamic text. The landing page builder gives you full drag-and-drop control over every element.
Common problems and how to fix them
Dynamic text does not change when you add the parameter. Check that the parameter name is typed exactly the same in your URL and in the page settings. They are case-sensitive. Service is different from service. Also confirm your browser is not caching an older version. Do a hard refresh or test in a private window.
The fallback text always shows, even with a parameter. The parameter might be misspelled in the URL, or the value is empty. Ensure the URL is structured as ?parameter=value without extra spaces. Some URL shorteners or redirects strip parameters. If you use a redirect, test the final destination URL directly.
The replaced text includes underscores or hyphens and looks awkward. If you pass values like emergency_plumber and use them directly as replacement text, the underscores show up on the page. Either map those values to clean phrases in the dynamic text settings, or set the parameter values to human-readable words separated by hyphens (like emergency-plumber) and then replace hyphens with spaces if your tools allow.
The replacement text does not fit the design. Test your page with the longest phrase you might use. If the text overflows or breaks the layout, shorten the phrase, reduce the font size slightly, or use a shorter variant. Check on mobile. Long words in a headline can wrap awkwardly.
The page looks perfect in the editor but not live. After making changes, publish the latest version. Some builders have a separate publish step. In Leadpages, click Publish and confirm the update. Then test the live URL.
You changed the parameter name and old links still work. Old bookmarks or ads that use the previous parameter name will now show the fallback. Update all ad URLs and any external links that use the parameter.
You see no improvement after adding dynamic text. Relevance alone may not lift results if the rest of the page does not match the promise. Review the whole page to ensure the offer, form, and proof elements align with each variation. Consider running an A/B test to compare a version with dynamic text against a static version. You can use the A/B testing feature in Leadpages to split traffic and measure the difference. The A/B test significance calculator tells you when you have enough data to decide.
Parameter values with spaces or special characters break the URL. URLs cannot contain spaces; they get encoded as %20 or +. Pass values without spaces and then map them to readable text. For example, use water-heater and map it to "Water Heater Repair."
What to do next
After setup, test your page across devices and ad platforms. Run your page through the landing page analyzer to get a score and find issues with load speed, mobile design, and content. Use the insights to tighten the page before you spend more on ads.
If you created dynamic headlines, try different versions with the headline analyzer. The tool scores your headlines and suggests edits, so you can pick the phrasing that reads best.
Dynamic text works best when the rest of the page feels cohesive. If you run paid search campaigns, build a dedicated landing page for each core theme using a consistent template. Browse the template gallery and choose a layout built for lead generation. The Leadpages solutions page for paid search shows how to align ads and pages. For social ad campaigns, see landing pages for paid social.
To see whether dynamic text changes how visitors behave, watch conversions. Leadpages analytics shows views, form submissions, and conversion rates per page. Use that data to decide whether to extend dynamic text to other elements or more campaigns.
When you want to build a new page that uses dynamic text, start from scratch or let the AI page builder generate a layout from your description. Then add dynamic text to any headline or button. The builder includes the dynamic text toggle in the text settings, so there is no separate tool to learn.
To start using dynamic text replacement on your own pages, sign up and build your first adaptive landing page. Start building free.