How to pass user data through URL parameters Follow
Easypromos allows passing parameters from the incoming URL to the participant's user properties. This way, the promotion administrator has a feature that enables adding identifying fields to participants based on the referral URL used to access the promotion
A practical example:
A brand sends a newsletter to its subscribers with a link to a survey. Everyone who completes the survey will enter a prize draw. In this case, the brand includes parameters in the survey link that make it possible to retrieve the subscriber's first name, last name, and email address. When the user receives the newsletter and clicks the link, they can complete the survey without having to manually enter their name or email, as Easypromos will read the identification parameters from the URL and assign these values to the participant's user profile.
This tutorial explains all the steps to pass users' unique identification parameters through the URL.
Note: The feature of passing user data through URL parameters is only available in White Label version.
These are the contents of the tutorial:
-
How to Build the URL with User Identification Parameters
-
Advanced Configuration: Passing Additional Parameters via URL
-
Can I use this feature if the promotion is embedded as a Widget?
1. How to Build the URL with User Identification Parameters
You can include the following parameters in the URL: the user's email address, first name, and last name.
When the user accesses the promotion's registration page, if these fields are present in the form, they will be automatically pre-filled. If the fields are not present in the form, the user will still be registered, and the values passed in the URL will be stored automatically.
In the following three sections, we explain:
1) the format of the parameters,
2) how to correctly build the URL,
3) and how to hide the name, last name, and email fields from the registration form.
Note: You can also send additional parameters through the URL. This advanced functionality is explained in Section 2 of the tutorial.
1.1. Parameter Format in the URL
To retrieve the values for First Name, Last Name, and Email, you must use the following parameters:
- fn (First Name): Parameter that can carry the participant's first name.
- ln (Last Name): Parameter that can carry the participant's last name.
- em (Email): Parameter that can carry the participant's email address.
These parameters should be added to the URL of the promotion. If the platform detects these parameters, they will be saved in a cookie during the user's session in the promotion, and if the user ends up registering the parameters will be saved as name, last name and email of the user.
It's not necessary to use all 3 parameters, you can use all 3, 2, or just 1.
Note: If the entry form of the promotion is enabled, the Name, Last name, and Email fields will be prefilled with the values the URL passes.
1.2. How to Build the Promotion URL with Parameters
To retrieve the values for First Name, Last Name, and Email through the promotion URL, the administrator must add the parameters fn, ln, and em to the URL, using the format shown below:
https://a.cstmapp.com/p/986907?fn=USER_FIRST_NAME&ln=USER_LAST_NAME&em=USER_EMAIL
For example:
https://a.cstmapp.com/p/986907?fn=Mary&ln=Smith&em=marysmith@email.com
This way, when the user Mary Smith receives the newsletter and clicks on the survey link, she will see this URL in her browser:
And when reaching the Registration Form page, if the Name, Last Name, and Email fields are enabled, they will be pre-filled with the user’s values:
Note: The name of the tag for each field you want to pass through the URL varies depending on the email marketing platform used to send the newsletter. Therefore, the promotion administrator should check with their team about the tag format used by their email platform.
Example: If using Mailchimp, the tag names must be written in the following format:
https://a.cstmapp.com/p/986907/?fn=*|FNAME|*&ln=*|LNAME|*&em=*|EMAIL|*
1.3. Hide the Name, Last Name, and Email fields in the registration form
Additionally, you have the option to hide the "Name," "Last Name," and "Email" fields from the registration form, so that when users access the form, these fields are hidden. Even if hidden, when the fn, ln, and em parameters are passed via URL, the system will save this data in the user’s profile.
To hide these fields, go to Editor > Pages > Login & Registration > Form, where you should enable the following options:
1. To hide the Email field: edit the Email field and check the option "Hide this field if it is already pre-filled."
2. To hide the Name and Last Name fields: check the option "Hide the Name and Last Name fields."
2. Advanced Configuration: Passing Additional Parameters via URL
Additionally, the administrator can pass custom parameters through the URL to obtain extra values via the promotion URL, which will also be saved in each registered user’s profile.
2.1. Characteristics of the feature of passing customized parameters through URL
- You can add as many parameters as you wish per URL. Each parameter will become an attribute of the participant.
- The parameters can be a unique value. This means, that if this option is enabled, the system will control that there's no other user registered previously with the same value.
- It's possible to add validation rules to the parameters. Only those that have the values in the URL that pass the validation rules will be able to participate.
- The parameters can be optional.
- The user attributes that are passed as a parameter can be used to filter the participants in the admin panel of the promotion. Ie. search for the user with external reference XXX, or segment all the users with parameter values YYY.
- The user attributes that are passed as a parameter can be used to give additional entries in the draw. For example, give additional entries to all participants that have the parameter VIP = 1.
- The user attributes that are passed as a parameter are available in the participant list downloaded as CSV file and in the exportation of participants via REST API.
2.2. How to pass additional parameters via URL
To pass additional parameters through the promotion URL, you must use the “Hidden Fields by URL Parameter”, which need to be added to the promotion’s registration form. This means creating a new hidden field for each additional parameter the promotion administrator wants to pass through the URL.
To do this, follow the steps described below:
1. Go to the Editor > Entry form > Fields.
2. Add a new element of the type: "Hidden field via URL parameter".
3. Configure the following field options:
- Short title: The name of the attribute. This is the name of this field that you will see in the participant list.
- Hidden field via URL parameter: This is the exact name of the GET parameter that you will pass via the URL. Easypromos will review that there is a parameter in the URL accessing the promotion with exactly this name.
- Method of validation: Enable this is you want the value to be one-time use only, or you want to set validation rules by a regular expression.
- Is this field mandatory?: Check this option if this parameter is mandatory for the user to be able to enter.
Example
In this example, the brand wants to register participants with the member ID from their community and they also want to register if a user is a VIP member or not, because the VIP members will get an additional entry in the prize draw.
To do this, the brand has created a giveaway with entry form and has added two Hidden fields via URL parameter:
- member_id
- vip
The Member ID field allows you to pass the member_ID parameter, which must be a 6-digit numeric value. It must also be a single-use value, meaning only one participant can register with that ID. On the other hand, the Member VIP field allows you to pass the vip_member parameter, which can have two possible values: "0" for non-VIP members and "1" for VIP members.
If the promotion URL is https://a.cstmapp.com/p/986907 the brand should send the following link to member 789001, who is also a VIP member:
https://a.cstmapp.com/p/986907?member_ID=789001&vip_member=1
This way, when the user clicks the link, they will see both parameters in the URL:
Note: The organizer of the promotion needs to program the URL with the dynamic parameters from their own system in accordance with the parameters of the fields created in the entry form.
If the user signs up, the organizer will see the following in the participant list:
Additionally, the administrator can filter the participant list to see, for example, which VIP members have signed up, and apply bulk actions to a specific user segment:
3. Can I use this feature if my promotion is embedded as a widget?
Yes, it's possible to use this feature in promotions that are embedded in a website, etc. with the widget of the promotion, the pop-up widget or the link widget. It works just like without the widget. In the widget code, there's the "src" attribute which is where the URL that loads the widget is. You have to add the parameters to this URL of the widget.
Comments
0 comments
Please sign in to leave a comment.