How to Measure and Segment Form Conversions Based On Lead Quality

ListenLayer allows you to formulate and write rules that customize your data layer activity. Without any programming, you can build amazing data segments by identifying and categorizing the characteristics of a specific activity. For example, we will show you how to use a simple rule to measure form quality based on the user's email address in this use case. You can capture this as a new property in your GA4 events or segment conversions into other platforms such as Facebook Ads.

Segmenting and Enhancing Conversions Based on Quality

If you track multiple types of conversions across your website and use various marketing platforms to acquire visitors, you need ListenLayer to simplify your data collection. Simply turn on Listeners and then use GTM to target events at scale. Once you’ve set up a few triggers in GTM, you can multiply your tracking across all of your marketing analytics and advertising platforms.

Steps & Code Examples

Step 1: Add Your Domain Name Inside ListenLayer
Step 1: Add Your Domain Name Inside ListenLayer

Navigate to the Website screen of your ListenLayer account and add your website domain name. Then copy the Website Script to place on your website using Google Tag Manager.

Step 2: Deploy Your ListenLayer Website Script
Step 2: Deploy Your ListenLayer Website Script

Create a Custom HTML Tag inside of Google Tag Manager that fires on All Pages. Place the tracking script from your ListenLayer account. A sample is shown here, but you must use the code from your account, not this example code!

<script type="text/javascript">(function(c,a,d,b,e) {c[b] = c[b] || [];
c=a.getElementsByTagName(d)[0];a=a.createElement(d);b="dataLayer"!= b ?"&l="+b:"";a.async = !0;
a.src = "https://assets.listenlayer.com/datalayer.min.js?id="+e+b;
c.parentNode.insertBefore(a,c)})(window,document,"script","dataLayer",
"00000000-0000-0000-0000-0000000000000");</script>
Step 3: Enable Listeners and Activity Features
Step 3: Enable Listeners and Activity Features

Turn on the Listener for your form system using the Listener Library. Once your Listener is turned on, enable Activity Features under the Listener’s Features section.

In this example, we are using Hubspot Forms, and we enable the Regular Forms Activity Features.

Make sure to publish your ListenLayer changes before the following step.

Step 4: Test & Analyze Your Data Layer Activity
Step 4: Test & Analyze Your Data Layer Activity

After publishing ListenLayer, hard-refresh your website and use the browser’s console, or Google Tag Manager’s debug view to analyze your data layer activity. You want to become familiar with the structure of your Listener’s data layer and begin to identify ways to measure form quality.

In our example, we identify that each form uses the same email field. As a result, we can use values in the email address to measure quality. Now we need to write rules in ListenLayer to automate this measurement.

Step 5: Enable Custom Values
Step 5: Enable Custom Values

Turn on Custom Data Layer Values inside of ListenLayer by navigating to the Listener’s Feature’s screen.  Once enabled, a Custom Values menu item will appear where you can write rules to push custom values into the data layer. Before jumping into that, you’ll need to create the variables you would like to write values into.

Step 6: Create A Data Layer Variable for Form Quality
Step 6: Create A Data Layer Variable for Form Quality

Navigate to Custom Data Layer Variables under Global Settings and create the variables you want to use in your rule-writing. In this example, we create a variable called formQuality. Then, we will write rules to push values into this variable.

Step 7: Create a Rule to Measure Form Quality
Step 7: Create a Rule to Measure Form Quality

Navigate to Custom Values for your Form Listener and create a new rule. You can choose to create a Simple Rule or a Lookup Rule, depending on your situation. In our example, we create a Lookup Rule to define quality based on values inside the user’s email address.

Step 8: Select Events & Variables to Use in Your Conditions
Step 8: Select Events & Variables to Use in Your Conditions

To push custom values into the data layer, you must write conditions. Then, when those conditions are matched, you define what values to push into what variables.  While building your Lookup Rule, you’ll need to select existing Events and Variables inside the data layer used in your Conditions.

We use an event from a form submission and the email field variable in our conditions in this example.

Step 9: Select the Variables to Use In Your Rule
Step 9: Select the Variables to Use In Your Rule

You’ll then need to select the variables to define values for. We use the “formQuality” variable that we created under Custom Data Layer Variables in our example.

Step 10: Build Your Lookup Table Rules
Step 10: Build Your Lookup Table Rules

Now, use the simple Lookup Table layout to define your rules which determine form quality. Finally, save your changes and publish your ListenLayer account.

Watch the entire use case video for a more detailed breakdown of creating the rules.

Step 11: Test Your Form Quality Rules
Step 11: Test Your Form Quality Rules

After publishing your ListenLayer changes, you should be able to hard-refresh your website and test the activity.  You can use the browser’s console or Google Tag Manager’s debug view to test the rules.

Step 12: Create Your Google Tag Manager Variables
Step 12: Create Your Google Tag Manager Variables

Now that your data layer has information about the quality of form submissions, we need to make this available inside of Google Tag Manager as a variable.  This will allow us to capture the details into tags (such as GA4 Events) or to use the field as a qualifier inside a trigger (for example, create a trigger that only first on higher-quality form submissions).

Create a new variable inside of Google Tag Manager and select Data Layer Variable as the type. Then place the path to the variable in the Data Layer Variable Name. Name and save the variable.

Step 13: Create Your Tags & Triggers
Step 13: Create Your Tags & Triggers

Now that you have the variable defined in GTM, you can create Tags and Triggers that use this information.  In this example, we create a GA4 Event with a Property that captures the “formQuality” variable. This will allow us to segment form conversions in GA4 for better reporting.

Make sure to publish your GTM changes after testing.