Create Qualified Conversion Event in GA4 + Google Ads

Following these steps, you'll install the MadKudu tag on your website and create a key event in Google Analytics to track and identify qualified form submissions based on MadKudu's fit score data. This will enable you to improve ROAS by understanding the quality of all form submissions + help optimize campaigns toward form submissions that are most likely to convert to pipeline.

Prerequisites

  • MadKudu account and API key

  • Google Analytics set up on your website

1. Access the MadKudu Tag

  • Log in to your MadKudu account

  • Navigate to the Integrations tab

  • Locate the "MadKudu Tag" section

  • Open Display MadKudu Fastlane JS (legacy)

2. Copy the MadKudu Tag Code

  • Copy the provided JavaScript code snippet

3. Add the Tag to Your Website

  • Paste the JavaScript code into the head tag of your website OR install it through Google Tag Manager. If you need more detail, head here.

4. Initialize MadKudu tag

  • Use your unique MadKudu API key. Replace `"YOUR_API_KEY"` in the code snippet with your actual API key from the MadKudu dashboard

Create a Key Event in Google Analytics Using MadKudu Data

 

1. Enable Enhanced Measurement (if not already enabled)

  • Navigate to your Google Analytics property

  • Go to Admin > Data Collection and Modification > Data Streams

  • Select the data stream for your website

  • Ensure that "Enhanced Measurement" is turned on. This will allow automatic tracking of form submissions.

 

2. Create a Custom Dimension for MadKudu Data

  • Navigate to Admin > Property > Custom Definitions > Custom Dimensions

  • Click on "New Custom Dimension"

  • Name your dimension (e.g., "MadKudu Fit Segment")

  • Set the scope to "Hit"

  • Use "properties.customer_fit.segment" as the dimension name (this should match the data sent from MadKudu)

 

3. Modify the MadKudu Tag to Send Data to Google Analytics

  • Update your MadKudu tag to push the fit score data to Google Analytics. Add the following code snippet to the MadKudu initialization code:

 

<script>

  madkudu('identify', {

    email: 'user@example.com', // Replace 'user@example.com' with the actual email data from your form

    callback: function(result) {

      if (result.properties.customer_fit.segment === 'good' || result.properties.customer_fit.segment === 'very good') {

        gtag('event', 'qualified_form_submission', {

          'event_category': 'Form',

          'event_label': 'Qualified Submission',

          'value': result.fit_score,

          'dimension1': result.properties.customer_fit.segment // Ensure 'dimension1' matches the index of your custom dimension

        });

      }

    }

  });

</script>
JavaScript

 

Replace 'user@example.com' with Dynamic Email Data:

 In the line email: 'user@example.com', replace 'user@example.com' with the actual email address captured from your form submission. This means you need to dynamically insert the user's email address from your form into the script. For example, if you are using a JavaScript variable to hold the email address, it might look something like this:

 

<script>

  // Assume you have a variable `userEmail` that holds the email address from your form

  var userEmail = document.getElementById('emailInput').value; // Adjust the selector to match your form

  madkudu('identify', {

    email: userEmail,

    callback: function(result) {

      if (result.properties.customer_fit.segment === 'good' || result.properties.customer_fit.segment === 'very good') {

        gtag('event', 'qualified_form_submission', {

          'event_category': 'Form',

          'event_label': 'Qualified Submission',

          'value': result.fit_score,

          'dimension1': result.properties.customer_fit.segment // Ensure 'dimension1' matches the index of your custom dimension

        });

      }

    }

  });

</script>
JavaScript

 

4. Create a Key Event in Google Analytics

  • Navigate to Admin > Events

  • Click on "Create Event"

  • Name your event (e.g., "Qualified Form Submission")

  • Set the matching conditions:

    • Event name: `qualified_form_submission`

  • Add any additional conditions if necessary

 

5. Set Up a Key Event in Google Analytics

  • Go to Admin > Data Display > Key Events

  • Click on "New Key Event"

  • Enter the event name you created (ex. "Qualified Form Submission")