Can I populate UTM parameters into a pop up form?

  • David Weaver
    Asked on June 9, 2018 at 1:29 PM

    I want to run pop up forms on my website and will need to populate the visitors traffic source by adding the UTM parameters they came in from to the pop up form. 

    Is this possible?

    If so, will it work beyond the landing page as if they click to a second page the utm parameters are not present in the URL of the page they click on. 

    Thanks

  • Vanessa_T
    Replied on June 9, 2018 at 3:02 PM

    If you are embedding the form, the UTM parameters needs to be where the form is loaded, so that the form can fetch the params.

    All you need to do is create a field on your form with the name exactly as the UTM parameters. In my example below, I have added the UTM params on the page I am visiting, the utm fields then on the form are automatically prepopulated. For sample purposes, I've intentionally shown the fields. If you plan to do this route, you should hide the utm fields.

    Can I populate UTM parameters into a pop up form? Image 10

  • Vanessa_T
    Replied on June 9, 2018 at 4:14 PM

    I took a second look to your case and went in to create a script for you. If you would like to popup your JotForm forms and be able to retain the UTM parameters unto the popup, please embed this script into your page:

    https://form.jotform.com/81596103660961">Test UTM

     

    Please change the highlighted URL (green highlight) to the URL of your form. So basically what the script does is, get the parameters of the page, then concatenate it with your form's url, so then your fields will be prepopulated.

    To summarize:

    1. create fields in your form with the name exactly as the parameter

    2. hide these fields, so users can't edit it

    3. get your form URL

    4. edit the script I gave above and replace the highlighted in green form URL, into one of your forms

    5. add the edited script unto your website

    Here's how it should look:

    Can I populate UTM parameters into a pop up form? Image 10