Provided information on Add Profile Information to HTTP Parameters
Answer
After creating a short link you can edit it to configure it to pass extra information to the page it links to. Just check the "Add Profile Information to HTTP Parameters" box. To pass a parameter, add a name for it in the Remote Name column.
The Remote Name must map to the form field name. You may choose to use the same field names as Mobile Commons on your form. Or you may tie your form field names to our Mobile Commons field names with the Remote Name section. If you are calling the phone number field in your form phone_number you would put "phone_number" next to the Field "phone" to make sure the phone number we pass populates to your phone_number field in your form. If we do not find a matching field name we will not write anything to that field.
Then, when you use the short link (or the original link) in the body of the message. When the user clicks that link, they’ll be redirected, and we will append their profile information to the url.
For example, if your message looks like this:
Hi. Visit {{http://lil.ms/aaa}} to donate
Users will get a message that looks like this:
Hi. Visit http://lil.ms/aaa/1234 to donate
Then, when they click "http://lil.ms/aaa/1234", they will be redirected to something like "http://www.example.com/some_page?profile_first_name=XXXX........".
This information will be passed across the first time a user clicks the link. The next time they click that url we will not pass across the parameters.
Populating Your Web Forms
You can use the profile information that was passed to pre-fill form fields. If you are managing your own forms, we recommend that you pre-fill form fields when the page is generated, using a server side language.
Alternatively, you can use Javascript, after the page is loaded, to pre fill the form fields. Our sample Javascript file below will populate the first form on the page. You may modify the contents of the file, save that and add your new Javascript file to your form page.
We provide a sample Javascript file you can use. You will need to paste this code within the html of the page that generates the form.
<script src="https://secure.mcommons.com/params_to_form.js” type=“text/javascript”/>
If you are using a hosted web form provider, in order to use this, you will need to be able to load javascript from an external URL, an uploaded file or paste it in as an inline javascript (upon editing the form).
If you are not able to take one of those three actions, or the form is not built to automatically pre-populate from HTTP parameters, the form will not pre-fill (or populate) with the content sent over in the url.
Populating Convio Forms - For Those Using Convio Forms ONLY
Certain Convio donation forms do not require Javascript or server side changes. This is documented in the Convio help center here.
You may use our javascript, but the mapping must be as denoted below, where anything starting with profile is the Mobile Commons value, and the second value is the name of the field in Convio (yours may be different).
convio_form_map = {"profile_postal_code":"zip",
"profile_city":"billing_addr_cityname","profile_street1":"billing_addr_street1name",
"phone":"donor_phonename","profile_first_name":"fname",
"profile_state":"billing_addr_state","profile_street2":"billing_addr_street2name",
"profile_email":"email","profile_last_name":"lname"}
Resolution Category
Question: Product How-To / Training
Internal Information