Can I add custom fields and IDs to incorporate the GCLID for my Adwords campaigns?

  • Profile Image
    inspiremenaturally
    Asked on April 21, 2017 at 02:22 PM

    Hello, 

    I need to edit my forms to include the following hidden field: 

    input type="hidden" id="gclid_field" name="gclid_field" value=""

    Then, I need to create this script before the closing body tag on my page where the form is published:

    function readCookie(name) { var n = name + "="; var cookie = document.cookie.split(';'); for(var i=0;i < cookie.length;i++) { var c = cookie[i]; while (c.charAt(0)==' '){c = c.substring(1,c.length);} if (c.indexOf(n) == 0){return c.substring(n.length,c.length);} } return null; } window.onload = function() { document.getElementById('gclid_field').value = readCookie('gclid'); }
    This will allow me to obtain the GCLID from my Adwords campaign so that I can import offline conversions for my form submissions.

    Are custom fields possible when building my Jotform? Can I add this custom field so that I can import my form with the simple javascript code and add my other script for tracking directly on my Wordpress website where the form is hosted?

    Please let me know what types of customization Jotform will allow.

    Thanks 
  • Profile Image
    jonathan
    Answered on April 21, 2017 at 05:04 PM

    There is a Hidden Box field available on the form. You can use that as your hidden field with hidden value.

    And then for custom javascript to work and be injected on the form, you will use the Full Source code of the form and have it hosted on your website page.

    Let us know how we can be of further assistance.