How to prefill form fields through the URL

Tabata Vossen -

In this tutorial, we tell you how to use URL parameters to prefill form fields.

Typical situation: You created a quiz, which you shared with your database through an emailing campaign. Users who will click on your campaign shouldn't have to fill out fields about their personal information such as their name or email address since you already have the data! In Qualifio, it is possible to prefill these fields.

Here are the 5 steps to follow in order to use this very useful feature:

1- Select the right publication channel

This feature works whether you publish your campaign on a mini-site or use the JavaScript (JS) integration code to embed it on another webpage (iframe).

2- Get the URL to use in your email

prefill-from-email.png

3- Integrate your CRM/emailing variables

In the screenshot above, we framed with red rectangles the generic variables linked to the form fields of your campaign. You need to replace these variables with your own emailing CRM variables. For instance, in the generic URL below:

https://test.qualifioapp.com/20/action/load.cfm?ID568408=Firstname&ID568409=Lastname&ID568410=Email&url=www.domain.com/page.html

In this generic URL found in Qualifio, you should thus replace the variables, which are generic too, with your own CRM variables. For example, your variables might be:

  • Firstname: $firstname$ or {firstname} or *|FNAME|*
  • Lastname: $lastname$ ou {lastname} or *|LNAME|*
  • Email: $email$ ou {email} or *|EMAIL|*

(The nomenclature/classification of these variables depend on what CRM or emailing platform you are using.)

Attention, Internet Explorer may not read the variables if they have spacing in it. Make sure to URL-encode your variables!

You'll also need to replace "www.domain.com/page.html" with the URL of your campaign. For instance:

  • If your campaign was published as an iframe on your website, use the parent URL of the iframe.
  • If your campaign was published on a minisite, use the URL of that minisite.
  • If your campaign was published on your Facebook Page, use the URL of that Facebook Page.

Here's the kind of URL you should thus integrate into your email:

https://test.qualifioapp.com/20/action/load.cfm?ID568408=$firstname$&ID568409=$lastname$&ID568410=$email$&url=www.qualifio.com/product

Prefilling opt-ins

If you are passing through name and email you need to use a link such as:

https://demo.qualifio.com/prefilling-optins/?ID1234567=*|FNAME|*&ID2345678=*|LNAME|*&ID3456789=*|EMAIL|*

Once you have your form fully created with the opt-ins, you'll need to view the prefill URL once again. You'll see something like this:

Screenshot_2020-10-20_at_14.48.17.png

In the image above you can see a URL parameter with the name “OID”, which is the one you need to use to prefill your opt-in. In this case, it is “OID12345”.

To prefill the “OID12345” opt-in, you would simply add your variable (or “merge field”) to the URL. For instance:

&OID12345=*|SUBSCRIPTION1|*

So the final URL, in this case, would be:

https://demo.qualifio.com/prefilling-optins/?ID1234567=*|FNAME|*&ID2345678=*|LNAME|*&ID3456789=*|EMAIL|*&OID12345=*|SUBSCRIPTION1|*&url=https...

When you are passing information from your vendor, you can use the following values:

  • true1 and on will all mark the checkbox (or the "yes" option) as selected;
  • false0 and off mean that the checkbox is not selected (or that "no" is selected);
  • if the value that is passed is empty or not supported, then we'll make sure that the checkbox or radio buttons are not selected.
Note: This is not case-sensitive, so "yes", "Yes" and "YES" are correct.

Prefilling a Webview link

You can prefill your Webview link, too. Here's an example link from the Webview tab:

https://faq.qualifioapp.com/20/7A2AF396-E32D-4FBA-AD02-ABF394D04530/v1.cfm?id=7A2AF396-E32D-4FBA-AD02-ABF394D04530

Now, copy your Webview URL and place an ampersand (&) after it. Here's what our example link looks like:

https://faq.qualifioapp.com/20/7A2AF396-E32D-4FBA-AD02-ABF394D04530/v1.cfm?id=7A2AF396-E32D-4FBA-AD02-ABF394D04530&

Next, pick one field from the form that you want to prefill and place it after the ampersand (&). Here, we're using the email field. Add an equals sign (=) after the field name.

https://faq.qualifioapp.com/20/7A2AF396-E32D-4FBA-AD02-ABF394D04530/v1.cfm?id=7A2AF396-E32D-4FBA-AD02-ABF394D04530&Email=

After the equals sign (=), you'll want to enter your variable for the data that will prefill the form field.

https://faq.qualifioapp.com/20/7A2AF396-E32D-4FBA-AD02-ABF394D04530/v1.cfm?id=7A2AF396-E32D-4FBA-AD02-ABF394D04530&Email={email}

To prefill more than one field, you can add more fields with their corresponding variable, separated by an ampersand (&).

https://faq.qualifioapp.com/20/7A2AF396-E32D-4FBA-AD02-ABF394D04530/v1.cfm?id=7A2AF396-E32D-4FBA-AD02-ABF394D04530&Email={email}&Firstname={firstname}

Repeat this as needed.

Note: In general, if everything is working as expected with your prefilling links, you most likely do not need to worry about URL encoding. However, if you are seeing errors, then you might have to use URL encoding. If you are sending out a prefiling link through a Mailchimp email for instance, then you can address this with the help of this article. Please note that we are unable to provide support for external vendors, and this is something you would need to set up on your end.

4- Add UTM codes to track the success of your email marketing (optional)

You can use UTM codes to tell Qualifio that participants came to your campaign from your email.

Read this article to learn what UTM codes are, how you can use them with Qualifio, and the statistics you can access.

A word of caution: When using tools that allow you to easily add UTM codes to URLs (such as Google's Campaign URL Builder), you may find that they encode information in a specific way, replacing some characters with a "%" followed by two digits. This format is called the URL-encoded (or "Percent-encoded") format. This might cause your link not to work in emails. To fix it, simply use a URL Decoder (such as this one) to decode your URL before you insert it in your email.

5- Perform a test

In order to make sure that everything works as it should, we recommend you perform a test. If it works properly, here's the expected behaviour:

  • You get an email that promotes a campaign;
  • You click on the link within the email;
  • You take part in the campaign;
  • When you get to the "Form" step, the first name, last name, and email address fields are prefilled with your personal information.

Important note on cookies

To use this feature, we drop a functional cookie on the user's browser. This cookie uses the domain of the iframe that will be prefilled (e.g. interact.sandqgroup.com).

As of 2018, some browsers started blocking third-party cookies and trackers by default. It is thus important to use an iframe that is on the same domain as the parent page where it’s embedded (in this example: www.sandqgroup.com). That way, the cookie is not considered as a 3rd party cookie and not blocked.

When you use a subdomain of your domain to publish your Qualifio campaign (e.g. quiz.mydomain.com instead of customername.qualifioapp.com), the cookie is considered as first-party and isn't blocked by any browser.

 

Read more: