Use URL parameters to track conversions for HTML Forms
How it works
HTML Forms support URL parameters, also known as UTM codes, as a way to track conversions (more details on how to set up hidden fields)
Setup Guide
First, add UTM codes to your Formli. These codes will be automatically included into the HTML form code as hidden fields in the first Formli block. When a user submits a response along with a link containing these URL parameters, it will be saved in the Formli responses.
Step 1. Add UTM codes to the Formli
- Open
More
menu and chooseEdit settings
. - Scroll to the bottom of the Settings page and open the
Hidden Fields
section by clicking on the arrow. - Add the names for URL parameters (UTM codes).
- To add more URL parameters, click
+ Add Parameter
. - Click on the
Save changes
button.
Step 2.
- Open
More
menu and chooseEmbed on website
. - On the
Page Body
tab (1), selectHTML
(3) from the dropdown list (2).
3. You will found all your hidden fields (URL parameters) in the generated HTML of the first Formli block.
<input data-os-element="metadata" data-os-metadata="source" type="hidden" />
- The
data-os-element="metadata"
attribute indicates that this is metadata of the form response. - The
data-os-metadata="source"
attribute specifies the name of the hidden field, such as"source"
type="hidden"
indicates that this field isn’t visible for your responders.
- If you've already used this HTML form on your website, you can copy only the sections of the code that contain inputs for hidden fields and add it to the first block code. Alternatively, you can copy the entire form's code (for a detailed guide, click here).
As the result when the user opens the link containing this URL parameter, it will be saved into the Formly response.