Query Parameters
Make sure to properly encode the query parameters in your code.
Required Parameters#
All parameters are optional to prefill.
Optional Parameters#
| Parameter | Type | Description |
|---|---|---|
first_name | String | The first name of the user. |
last_name | String | The last name of the user. |
company_name | String | The name of the user's company. |
birthdate | String | The birthdate of the user. Must be in the ISO 8601 format (YYYY-MM-DD). |
email | String | The email of the user. Must be a valid email address. |
phone_number | String | The phone number of the user. |
utm_source | String | This parameter is used for tracking the source of the traffic. |
These parameters should be included in the URL query string when making a request to our API.
The Significance of utm_source#
By utilizing the utm_source parameter, we can tailor the user experience on your platform according to your specific needs. Kindly reach out to us to discuss the required steps for implementation
Encoding Parameters#
When adding query parameters to the URL, it's important to ensure that they are URL encoded. This means that certain characters are replaced with a string that represents the same characters in the URL-encoded format. For example, spaces are replaced with %20, and so on.
Here's an example of how to encode parameters in JavaScript:
const params = new URLSearchParams({ first_name: "John Doe", last_name: "Doe", email: "john.doe@example.com", phone_number: "+1 234 567 890", company_name: "John Doe Inc.", birthdate: "1980-01-01", utm_source: "example_source",}).toString();
const url = `https://www.send.glede.app?${params}`;
// Prints: https://www.send.glede.app?first_name=John%20Doe&last_name=Doe&email=john.doe%40example.com&phone_number=%2B1%20234%20567%20890&company_name=John%20Doe%20Inc.&birthdate=1980-01-01&utm_source=example_sourceconsole.log(url);