Dynamic Text Replacement / How to use URL parameters on your page

NOTE: This feature is only available for some of our subscriptions. If that is the case, you will see an upgrade prompt when attempting to access it. More information about our currently available subscriptions can be found here: https://instapage.com/plans 


URL parameters are tags that are added to the end of your URL, usually for tracking purposes or for dynamic content insertion.
The most known of URL parameters are UTM parameters, used by Google and Facebook ad links, in order to find out more about how your visitors interact with your ad.

NOTE: UTM parameters are case sensitive, so it is important to note that [UTM_Source] and [utm_source] are not the same. Check the format that you are using in your URLs and configure the dynamic text replacement on the page accordingly.

NOTE: In observance of GDPR, we do not recommend using personal data in combination with the feature in this article. GDPR defines personal data as any data that can be used to clearly identify an individual. 

How does it work?

With our Dynamic Text Replacement feature, you can use the information from the URL parameters on your landing page. You just have to type the exact same thing as in the URL, between square brackets, and that’s it. The brackets are what makes this feature work - they indicate to the page generator that the text between them should be replaced with the value of that parameter from the URL. 

NOTE: If you notice that non-alphanumeric characters from URL parameters are not being captured correctly, you might need to encode them. For example, you must write name%2babc@domain.com in the URL parameter for name+abc@domain.com to be captured on the page by our Dynamic Text Replacement feature. You can find an encoding reference here: https://d.pr/myosk2.

In the GIF below, you can see the first use case illustrated. The other two use cases do not function on a different principle, they are just other ways you can use the same feature for different end results. If the name of a URL parameter is found between square brackets anywhere on the page, it will be replaced with the value of that parameter whenever it exists in the URL.


If you are using a single landing page with DTR, if the visitor does not have the parameters in the URL, the text shown will be the exact same one you typed in.
The Personalization feature can solve that by having a regular block of text, without a placeholder. The default experience is the one shown without parameters, and you can have the default text on it without any dynamic text replacement placeholder. Since the custom experiences must have different parameters, you can use dynamic text replacement only on those (check this article for more details: https://d.pr/SaBmCB). This will provide a more natural experience for your visitors who will land on the page without parameters, intentionally or accidentally.

Note that Personalization is not available for all the subscription levels. If you would like to upgrade your subscription, you can get in touch with our team here: https://d.pr/5FJvda.

The base feature described in this article is available for all subscription types.

IMPORTANT NOTE: If the same parameter is found in the URL twice, the DTR feature will capture the value of the last appearance. The previous values will not be captured at all. 
EXAMPLE: https://lp.domain.com/utm_source=facebook&utm_source=google    ⇒ the value captured by [utm_source] on your landing page will be "google"

Use case 1 - using URL parameters in the copy of your landing page

You can do this if you want to use URL parameters on your page to dynamically display things like location or someone’s name if you already have that information.

Make sure the page’s URL includes the parameters you want to use, such as https://mylandingpage.your-domain.com/?location=cityname&name=firstname

Then you can write the copy of any text element on the page to include those parameters, such as “Welcome [name] from [location]!”


Use case 2 - using URL parameters in a hidden field

Let's say the URL of your page is www.your-domain.com/?utm_source=google

You can use [utm_source] in a hidden field on your form in order to see if the visit was triggered by an ad shown on Google. Here’s how the form from your page will look:


If you share your live landing page URL with the parameter included, the hidden field will be automatically populated from the UTM parameter, and the information will be passed along with the lead information.

Don't forget to map the new hidden field with your integration if you are using a CRM and want the information in the field to be sent to it together with the rest of the lead.

If your URL does not have UTM parameters attached to its end, the hidden field will just be passed as containing the text within it, [utm_source] or the equivalent. The dynamic text replacement feature replaces the text in the field if the appropriate URL parameter is found. Otherwise, the text remains the same.

NOTE: UTM parameters are case-sensitive, so it is important to note that [UTM_Source] and [utm_source] are not the same. Check the format that you are using in your URLs and configure the hidden field accordingly.

Use case 3 - dynamically pass existing URL parameters through a redirect

! If you are looking to pass all of your parameters through the URL after a redirect, you can use the built-in feature described in this article https://d.pr/rLBv8I instead of using the method described below.

You can use this if you want to send specific URL parameters with which the user arrives on your landing page to an external link that the user is sent to by clicking a button on your page.

Create a button by selecting the Button element from the left sidebar:

add button icon on the left tab

Click the button, then select the Link setup option from the right-side menu, then choose Outside URL.


Let’s say the URL of your landing page is www.your-domain.com, and you use a parameter when you link the page in an ad: www.your-domain.com?param_1=zvalue
"zvalue" is a placeholder here, it is a value you already have, and you want it to be passed through when someone clicks a button on the page to be redirected.

After adding the button on the page, enter the link you want the button to redirect to, including the parameter in your page’s URL, as follows: https://link.com/?param_2=[param_1]

When clicked, it will direct the user to https://link.com/?param_2=zvalue since you gave "param_1" that value ("zvalue") originally, and then you gave "param_2" the value of "param_1".

Of course, you can replace the name of the parameter with anything you wish, such as “source”, “location”, etc., and even have multiple such parameters in the same URL. The value will be what you want to pass through. Keep in mind that "zvalue" is simply a placeholder name for that.

Your page URL: https://lp.yourdomain.com/?utm_source=google&utm_medium=search&utm_location=AZ&gclid=12345
The URL you type in the redirect field: https://redirect.yourdomain.com/?utm_source=[utm_source]&state=[utm_location]&gclid=[gclid]
The URL the visitor gets redirected to: https://redirect.yourdomain.com/?utm_source=google&state=AZ&gclid=12345 

Note: You can use the same method to make an image or a text element redirect to an external link with existing dynamic parameters.

Tip: you can create personalized Thank You pages by using dynamic text replacement in conjunction with this guide from here: https://d.pr/rLBv8I, implemented on your main landing page.