Docs / Integration Tutorials /  

Cognito Forms

Cognito Forms Conversion Tracking And Attribution – How To Set Up

Track Cognito form submissions on the website, attributing all future revenue to the website visitor source.

Contents

Track Cognito Forms leads

Cognito form tracking enables Able CDP to attribute each follow-on purchase, such as a closed-won CRM deal or a Stripe payment, to the original website visitor source and ad click. This is done by linking the email entered in the Cognito form with the visitor details and subsequently using this association to attribute future revenue to the source.

This allows for accurate reporting of the sources of each conversion that follows a Cognito form submission in Google Analytics, Facebook Ads, Google Ads, and TikTok, as well as significantly improving the quality of tracking the lead form submission event itself.

Identify field names used by Cognito

You'll need to know how the fields you're interested to track alongside the leads are called in Cognito. We'll use 'Email' and 'FirstName' in this example.

We recommend to record email and/or phone to attribute future purchases to the lead and website visitors, as well as, optionally, first name, last name and company name to assist with identifying lead in Able.

Add additional tracking code to the website

In addition to the regular Able tracking code, add the following code to the website source. In order to work correctly, it must be placed after the Cognito Forms embed code.

<script>
  Cognito.on('beforeSubmit', function(event) {
    // Capturing name and email from Cognito form
    // You'll need to adjust this based on your form's field structure
    var firstName = event.data.entry.FirstName;
    var email = event.data.entry.Email;

    // Send captured data to Able CDP as a Lead event
    uipe('track', 'Lead', {
      keys: {
        email: email,
        // Assuming there's no phone field in the Cognito form,
        // so we don't set it here
      },
      lead: {
        firstName: firstName,
      },
      // You can also send other data or omit the message field
        // if you don't have it in the Cognito form
      // message: event.data.entry.Message,
    });
  });
</script>

Make sure the variable names and form fields match the ones used in Cognito. All standard fields supported by Able are listed in our webhook documentation.