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 Smartpages 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 Smartpages 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.
  1. 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:


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.

  1. Create the link itself. Imagine, this is your general link to your landing page:

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

  1. 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.

Was this article helpful to you?


Comments are closed.