How-to Track Web Forms in WordPress

May 03, 2024 - Mike Hakob

Every website form represents a conversion between you and your customer. Losing form submissions is basically saying goodbye to potential customers and revenue.

More than two-thirds of your website visitors never reach you. One thing, I learned in my years of Content Marketing is that every problem has a high-tech solution. Let’s see how you can incorporate FormStory with your WordPress Website.

How to Set Up FormStory in 3 Steps

Step N1: Log into your FormStory account and enter the URL containing the form you want to track. If you don’t have an account, sign up using your Google account or create a new one by clicking “Create Account”.

formstory configuration

Step N2: Click “Create New” and go through the setup process.

Formstory configuration to select form

Step N3: Copy & paste the provided script into the <head> of your website’s source code.

formstory tracking script

If you are using WordPress, there are two ways to add a script into the <head> tag of your website’s source code. There are two methods to execute this on WordPress.

Method N1: With a Plugin

This might sound too complicated and technical for you if you are a non-techy person. However, this method is one of the simplest things you can do.

Choose the right plugin, Some popular options:

To use one of these plugins and add the code to your WordPress header, follow these simple steps:

1. Start by installing and activating your chosen plugin. It’s as simple as heading to your WordPress dashboard, clicking on ‘Plugins’, and then ‘Add New’. Search for your plugin, hit ‘Install Now’, and then ‘Activate’.


2. Once your plugin is activated, navigate to ‘Settings’ and find ‘Insert Headers and Footers (or whatever your plugin is named).

3. You’ll see options for both headers and footers. This is where you paste your custom code. To add the tracking script find the “Scripts in Header” section, and paste the script as given in the image below.


Hit “Save”, and voilà, you’ve just started your tracking journey.

Method N2: Without a Plugin: Manually.

For those who’d rather skip the plugin route, tweaking your WordPress site’s functions.php file is a solid alternative. This approach requires more hands-on experience with WordPress and a bit of PHP familiarity, but it’s nothing you can’t handle.

Here’s how you can manually insert code into your WordPress header and footer:

  1. Go to your WordPress dashboard and go to ‘Appearance’ > ‘Theme Editor’.
  2. On the right-hand side, under ‘Theme Files’, you’ll find the “Theme Functions (functions.php)” file. Give that a click.
  3. Now, you’re in the editor. Here’s where you’ll paste your custom code into the functions.php file. Just swap out “YOUR_CODE_HERE” with the script given by FormStory. See the image below.
  4. After pasting your code, hit “Update File”. This action embeds your specified code into both, the header, and footer of your site.And there you have it! With these steps, you’ve just manually added the tracking script to your site, and started to track web form in WordPress with FormStory.

Why do we recommend using a Plugin?

The first thing is it’s simple and easy to configure without extra tech knowledge and risk of breaking something. The second reason is that sometimes when you are using a third-party theme, you do not have access to that theme’s source code, which leaves you no other option than to use a plugin.

Mike Hakob

Mike Hakob is a seasoned digital marketing maven with over 15 years of mastery, and the visionary Co-Founder of FormStory. As the driving force behind Andava Digital, he has dedicated his expertise to empowering small to medium-sized businesses, crafting tailor-made websites and pioneering innovative marketing strategies. With a graduate degree in Management of Information Systems, Mike seamlessly blends the realms of technology and marketing, consistently setting new industry benchmarks and championing transformative digital narratives.