Categorize Website Conversions Automatically Across Marketing Platforms

Write powerful rules that categorize your conversion activity at scale, allowing you to send segmented data to all of your marketing platforms and collected more detailed analytics.

It's time for better segmentation!

ListenLayer allows you to automate your conversion tracking and website analytics collection, and you can implement powerful rules and features that enhance and segment your data using the data layer – no programming skills required! This use case illustrates how you can easily categorize all of your conversions for better segmentation and data analysis.

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 & Activity Features
Step 3: Enable Listeners & Activity Features

Turn on Listeners for the user activity and applications you care about. In this use case, we are focused on tracking conversions to turn on the Listener for Hubspot Forms. In the screenshot here, we turn on Activity features, which will push specific data layer events into the data layer automatically.

Step 4: Turn On The Custom Values Feature
Step 4: Turn On The Custom Values Feature

You’ll also want to turn on the Cust Data Layer Values feature under Customization & Storage. This will enable a new menu item called “Custom Values,” where you can write rules to push custom values in the data layer during certain events.

Step 5: Create Custom Data Layer Variables
Step 5: Create Custom Data Layer Variables

Before writing rules for custom values, we must have custom variables that will hold the values. Define these at the global level by navigating to Custom Data Layer Variables.

Step 6: Create a Lookup Rule
Step 6: Create a Lookup Rule

Once you have variables available, navigate to Custom Values under the Listener and create a rule. In this example, we are going to select a Lookup Table rule.

Step 7: Select Data Layer Elements for Your Conditions
Step 7: Select Data Layer Elements for Your Conditions

As you build your rule, you’ll need to select the elements you want to use inside your conditions (the rule sets that must be met for a value to be pushed into the data layer). For example, you can select from events or variables in the data layer to use in your conditions.

Step 8: Select Custom Data Layer Variables for Your Rules
Step 8: Select Custom Data Layer Variables for Your Rules

Next, select the custom data layer variables that you will use to define values. Then click Save & Manage Values to build your empty lookup table.

Step 9: Define the Rules Inside Your Table
Step 9: Define the Rules Inside Your Table

Now you can build our table. Again, we recommend reviewing the video use case in detail to understand better how this is done. An example is shown here.

Don’t forget to publish your changes once they have been saved.

Step 10: Test Your Data Layer Activity
Step 10: Test Your Data Layer Activity

After publishing your changes, test your data layer activity using the browser’s console or Google Tag Manager debug view. For example, you can see in this example that the custom values from our lookup table rule are now appearing in our data layer.

Step 11: Define Variables Inside of GTM
Step 11: Define Variables Inside of GTM

Now that we have custom values inside the data layer, we can use them in Google Tag Manager to segment our conversion tracking.  The first step is to configure our new variables in GTM. Create a Variable with the Type “Data Layer Variable” and set the variable name to the path for that variable. Watch the use case video for more details!

Step 12: Create Your Data Collection Tags
Step 12: Create Your Data Collection Tags

Now we can configure our data collection and conversion tracking using our new variables.  We can use a single Google Ads conversion tag and a lookup table to segment our conversion tracking based on the form categories we created in this example.