Dynamic text replacement on a landing page

Last updated: October 21, 2021 Written by: Avatar Justyna
share
Table of contents
share
Table of contents

The dynamic text allows you to personalize and customize content on the webpage by adding proper parameters to the URL address. You can successfully add dynamic text to your landing pages at the Landingi platform, also when using Google Ads and dynamic keywords.

Example of dynamic text usage

Users type different keywords in the browser while searching for your product. You want to display a different header for every group, relevant to their search, but on the same landing page with the same URL address. You don’t want to make many almost identical websites that will only differ in detail – it would be cumbersome to manage. In this case, it will be useful to put dynamic text on the landing page.

See below how it works:

Dynamic text on a landing page

Step I (Dashboard) – capturing parameters from the landing page’s URL by JavaScript code

1. Log in to the Landingi platform, go to the Landing pages tab and enter the Dashboard of the chosen landing page. Go to the JavaScript Code tab and click on Add script.

add script

2. Paste the code indicated below. Choose the Body bottom position on the Main page of the landing page and save the changes.

Step II (editor) – mark dynamic text on a landing page

1. Enter the editor of your landing page and add properly marked text in the desired location, according to the following schema:

%{{parameter}}||default_text%

In our example, it will be:

  • %{{destination}}||Italy%

More examples:

  • %{{name}}||Tom%
  • %{{any_parameter_name}}||any_text_here%

All dynamic text must be inserted between ‘%’ characters.

In double curly brackets, enter the name of the parameter to be passed as dynamic text.

After two vertical bars ||’, insert alternative text that will be displayed whenever no parameter is in the link. You can also leave this empty; in that case, no text will show up if the “general” (without parameters) link is used.

dynamic parameter landing page

2. Create the link itself. Imagine, this is your general link to your landing page: www.landing_page_address.com.

To add a parameter for a dynamic text replacement, add ?’, parameter name, and new text. Your changed link will look like this:

  • www.landing_page_address.com?destination=Italy
  • www.landing_page_address.com?name=Tom
  • www.landing_page_address.com?any_parameter_name=any%20text%20here

3. After completing the steps above, check if the dynamic text displays correctly on your landing page.

Few-word parameter

When the parameter in the landing page URL address consists of two words (or more), you have to add %20 between them so that they can be displayed as separate words in the page content. 

For example, your parameter consists of Rome and Italy. Include Rome%20Italy in the URL, and the dynamic parameter in the text will be separated with space: Rome Italy.

  • www.landing_page_address.com?destination=Rome%20Italy
share

Was this manual helpful?