Note: This blog post was written before we added the Embed Code field type to the form builder. You would now want to use the embed code field for this purpose.
One question I often hear is, “How do I insert my tracking code, such as Google Analytics, into my form?” I did a blog post last year telling you how to embed basically anything into a form using a Section, but now we have Description Area fields as well, which can be even more useful for embedding things like videos, widgets, tracking codes, etc.
Once you have your Google Analytics or other tracking code that you want to insert, open your form in build mode and click on “Add Field”. You will want to then choose “Description Area”. In the description area field, you will see a link under “content” that says “use plain text editor”. Click on this text to switch to plain text editor mode. Now paste in your tracking code here and hit the “Save” button.
Your code has now been added to your form, although the field and code won’t visibly show up in the form builder or on the form. You can switch the description area back to rich text if you like and add text to that field as you normally would, or you can leave it blank. Either way, the code is now on your form and should begin tracking hits.