---
title: URL Parameters
description: The article introduces URL Parameters and explains how they can be used to customize and analyze surveys based on known information.
---

[Skip to content](https://help.segmanta.com/url-parameters#main-content)

English

Show submenu for translations

![300x300 (1).png\]](https://help.segmanta.com/hs-fs/hubfs/300x300%20(1).png?height=40&name=300x300%20(1).png)

- [Default HubSpot Blog](https://segmanta-2.hubspotpagebuilder.com/blog)

Open main navigation

Close main navigation

- [Default HubSpot Blog](https://segmanta-2.hubspotpagebuilder.com/blog)
- English
  
  Show submenu for translations

 How can we help?

- There are no suggestions because the search field is empty.

1. [Segmanta Help Center](https://help.segmanta.com/?hsLang=en)
2. [Survey Editor](https://help.segmanta.com/survey-editor?hsLang=en)
3. [Distribution](https://help.segmanta.com/survey-editor?hsLang=en#distribution)

# URL Parameters

## The article introduces URL Parameters and explains how they can be used to customize and analyze surveys based on known information.

**💡 This article covers**

- [How to pass known parameters into a survey using the survey URL](https://help.segmanta.com/url-parameters#parameters-survey-URL)
- [How to understand the structure of a survey link with URL parameters](https://help.segmanta.com/url-parameters#structure-survey-link)
- [How to pass URL parameters into an embedded survey](https://help.segmanta.com/url-parameters#parameters-embedded-survey)
- [How to set up survey logic based on URL parameters](https://help.segmanta.com/url-parameters#survey-logic)
- [URL parameter use cases](https://help.segmanta.com/url-parameters#use-cases)
- [Analyze results using Custom Fields passed as URL Parameters](https://help.segmanta.com/url-parameters#results-custom-fields)
- [Customize your survey content using the URL Parameters](https://help.segmanta.com/url-parameters#customize)

### **Passing known parameters into a survey using the survey URL**

🔨 **How it works**: 

1. After adding URL parameter names to the parameter list in your **Survey Editor**, you can use these parameters to build survey links.
2. Select the **URL Parameters** you'd like to use with your survey link by checking the relevant boxes next to the parameter name.
3. **Copy and paste** the link wherever you plan to distribute the survey.

**Note**: When you distribute your survey link, you will need to ensure that the placeholder values are replaced with the values you want passed into your Segmanta survey. 

Values can be inserted manually or your CRM system or email marketing client should have an automated process for attaching values to parameters.

Here's an example of how the final survey link will appear when the respondent takes the survey. As you can see, we added the URL parameters for ***first\_name*** and ***last\_name***.

![](https://help.segmanta.com/hubfs/Knowledge%20Base%20Import/tempsnip-png-May-04-2023-07-33-24-8533-AM.png)

**Note**: URL parameters are limited to 100 per survey and parameters over 100 will not be saved.

### Understanding the structure of a survey link with URL parameters

Segmanta enables you to add parameter names to your survey link. Simply fill in the values for each of the parameters using your distribution methodology.

As an example, we will add the following parameters into the query string of a survey link. 

- First name
- Last name
- Age

Let's say the following two respondents took the survey:

1. Mark Zuckerberg, Age 17
2. Jane Doe, Age 27

Now, let's break it down:

**https://surveys.segmanta.com/publicid**    
This is your survey link without any URL Parameters.

***first\_name*** and ***last\_name*** are names of parameters  
You can define any parameters and any number of parameters you'd like.   
Each parameter has to be encoded using an equivalent of the [encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent).

first\_name=value1  
last\_name=value2

***mark*** and ***zuckerberg*** are valuesEach value has to be encoded using an equivalent of the [encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent). Unlike parameters, generally, values will change with each survey respondent.

first\_name=mark  
last\_name=zuckerberg

This is the format template of the survey link:

surveys.segmanta.com/**surveyId**/?**first\_name**=value1&**last\_name**=value2&**age**=value

This is the survey link of the example:

surveys.segmanta.com/**123abc**/?**first\_name**=mark&**last\_name**=zuckerberg&**age**=17

### Passing URL parameters into an embedded survey

💪 **When to use it**

- To make a URL parameter available in a Segmanta survey that is embedded into your website using a Segmanta embed code or Segmanta [Dynamic Embed](https://help.segmanta.com/dynamic-embed?hsLang=en) mechanism.

**🔨 How it works**

- To pass parameters that will be associated with the user’s responses, you should expose a global variable called:
  
  *SEGMANTA\_\_USER\_METADATA*

**Pro-tip**: For example, including the following \<script\> tag will associate  all responses with a Travel category on your website:

```
<script>   window.SEGMANTA__USER_METADATA = {       category: "travel"}</script>
```

- You can pass any keys inside SEGMANTA\_\_USER\_METADATA, except for a few keys which are reserved: host, widget, lang and embed\_type.

### Setting up survey logic based on URL parameters

🏠 **Where it lives**

- Go to the **Survey Editor** and click on **Logic**.

🔨 **How it works**

- Add a **Logic Rule** and set a **Condition** using a **URL Parameter**.
- - You can add a logic rule using a URL parameter as the condition either by: 
          - Selecting from one of the URL parameters available in the dropdown menu. URL parameters will appear in the dropdown menu if you have added them on the **Distribute** \> **Link** tab.
          - Typing a new parameter into the field.
    - Grab your survey link from the **Distribute** tab or test your survey by using the preview mode to ensure the logic is set up as you desired.

**Pro-tip**: You can set up multiple logic rules or rules on different questions based on different URL parameters.

- Make sure to include the custom fields as **URL Parameters** in the survey URL or your survey logic will not work.
- You do not need to set a value for the URL parameter and can set up the logic condition to Go To/Show/Skip based on there being any value for the URL parameter at all by defining the logic rule based on Not Blank.

### URL parameter use cases

Below, we outline four URL parameter use cases.

#### 1. Enrichment

💼 What it does: Matches your survey responses to your database in order to enrich consumer profiles or associate feedback with a certain customer.

#### 2. Survey Logic

💼 What it does: Sets up survey logic based on any parameter you pass into the survey (such as the examples above).

#### 3. Data Analysis

💼 What it does: Analyzes your survey based on previously known information passed through URL Parameters such as Gender, Age, Consumer Group, or Subscription Tier. 

#### 4. Content Customization

💼 What it does: Personalizes your survey using the URL Parameters you have chosen by customizing the content on any page of your survey with information you pass with URL Parameters.

💪 When to use it:

- - - To engage your users
          - To increase survey response rates

**Pro-tip**: Make your survey questions highly relevant to a respondent.

🔨 How it works: 

- - - Decide what parameters you want to pass and what you would like to name the parameter. Parameters can be named anything, except for a few parameters that are reserved, such as $lang (used for multi-language surveys).
          - Encode the parameter using an equivalent of the [encodeURIComponent.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
          - Add the parameter to a survey page by copying:

```
$url_param[parameter]
```

- - - Paste the code where you want the parameter to appear.
          - Replace the word "parameter" with the parameter you have chosen.
          - Set up your URL using the custom fields you have defined above (and any other custom fields you'd like to include).
          - Then, test the survey using the URL you set up and an example value/s by taking the survey in an incognito window.

**Note**: A custom field can be placed anywhere on your survey's Welcome Page, Ending Page or in a question page's Question Content. You cannot place custom fields into answer choices.

### **Analyze results using Custom Fields passed as URL Parameters**

💪 **When to use it**

- Incorporate known information about a respondent into your survey's Analytics Dashboard by analyzing the custom fields you incorporated in a survey URL or an embedded survey.

🏠 **Where it lives**

- Navigate to the **Question View** of your survey's **Analytics Dashboard**.

 🔨 **How it works**

- Click **+ Add Segment** to create a segment from your data.
- Navigate to the **Custom Params** tab and select the custom parameter you would like to use to filter your data.
- Choose which values you would like to include or include a filter for all respondents who have any value for that custom parameter.

### **Customize your survey content using the URL Parameters**

For example, you want to display your customer John Doe's first and last name in the survey's welcome page. 

- Go to the **Survey Editor** and click on the **Welcome Page**. Type "$url\_param\[first\_name\]!" into the text field. 
  
  ![](https://help.segmanta.com/hubfs/Knowledge%20Base%20Import/image-png-May-04-2023-08-06-12-1308-AM.png)
- Create your survey link using the parameters you decided to insert into the survey.

John's survey link would look like this:

https://surveys.segmanta.com/123abc?first\_name=**John**&last\_name=**Doe**

- Test the survey link. Now, when John clicks the survey link, this is how the Welcome Page will appear to him.

![](https://help.segmanta.com/hubfs/Knowledge%20Base%20Import/image-png-May-04-2023-08-07-27-8694-AM.png)

- [Getting Started](https://help.segmanta.com/getting-started?hsLang=en)
- [Survey Questions](https://help.segmanta.com/survey-questions?hsLang=en#main-content)

    - [Getting Started](https://help.segmanta.com/survey-questions?hsLang=en#getting-started)
    - [Display Settings](https://help.segmanta.com/survey-questions?hsLang=en#display-settings)
    - [Question Customization](https://help.segmanta.com/survey-questions?hsLang=en#question-customization)
    - [Advanced Settings](https://help.segmanta.com/survey-questions?hsLang=en#advanced-settings)
    - [Data Enrichment](https://help.segmanta.com/survey-questions?hsLang=en#data-enrichment)
- [Survey Editor](https://help.segmanta.com/survey-editor?hsLang=en#main-content)

    - [Survey Outline](https://help.segmanta.com/survey-editor?hsLang=en#survey-outline)
    - [Design](https://help.segmanta.com/survey-editor?hsLang=en#design)
    - [Logic](https://help.segmanta.com/survey-editor?hsLang=en#logic)
    - [Configurations](https://help.segmanta.com/survey-editor?hsLang=en#configurations)
    - [Permissions](https://help.segmanta.com/survey-editor?hsLang=en#permissions)
    - [Distribution](https://help.segmanta.com/survey-editor?hsLang=en#distribution)
- [Integrations](https://help.segmanta.com/integrations?hsLang=en)
- [Analysis & Analytics](https://help.segmanta.com/analysis-analytics?hsLang=en#main-content)

    - [Questions View](https://help.segmanta.com/analysis-analytics?hsLang=en#questions-view)
    - [Results Overview](https://help.segmanta.com/analysis-analytics?hsLang=en#results-overview)
- [Organization Settings](https://help.segmanta.com/organization-settings?hsLang=en#main-content)

    - [My Profile](https://help.segmanta.com/organization-settings?hsLang=en#my-profile)
    - [Accounts](https://help.segmanta.com/organization-settings?hsLang=en#accounts)
- [FAQ](https://help.segmanta.com/faq?hsLang=en#main-content)

    - [Survey Editor](https://help.segmanta.com/faq?hsLang=en#survey-editor)
    - [Survey Analytics](https://help.segmanta.com/faq?hsLang=en#survey-analytics)
    - [Organization Settings](https://help.segmanta.com/faq?hsLang=en#organization-settings)
    - [Data Privacy and Security](https://help.segmanta.com/faq?hsLang=en#data-privacy-and-security)
    - [Integrations](https://help.segmanta.com/faq?hsLang=en#integrations)
    - [Embedding](https://help.segmanta.com/faq?hsLang=en#embedding)
- [Contact Us](https://help.segmanta.com/contact-us?hsLang=en)

- [Default HubSpot Blog](https://segmanta-2.hubspotpagebuilder.com/blog)

[![Chill listening crop-3](https://help.segmanta.com/hs-fs/hubfs/Segmanta_logo_Final.png?width=108&height=24&name=Segmanta_logo_Final.png "Chill listening crop-3")](https://www.segmanta.com/)

<https://www.linkedin.com/company/segmanta/mycompany/> <https://www.facebook.com/segmanta/>

Copyright © 2026, Segmanta