Using Non Net-Results Forms in Net-Results

What You'll Learn

Why Post to the Net-Results’ Form Handler

How to Post to our Form Handler

Why Post to our Form Handler?

If you have a non Net-Results form on your website that you do not want to replace with a Net-Results Form, but you would like to trigger automated actions in Net-Results whenever that form is submitted, posting to our Form Handler is a great long-term solution.

The Basics

Your non Net-Results forms all “post” their submissions to somewhere when a website visitor submits your form, their form submission is “posted” to that form’s “handler”.

In addition to posting each submission to your existing form handler, you can also post that submission to the Net-Results form handler. Net-Results will treat it just like the submission of any Net-Results form which means you are able to trigger any number of automations in Net-Results based on submissions of non Net-Results forms.

Common Use Case

If you have customized or highly complex forms that you do not want to change or replace with a Net-Results form, we created this solution for you.

By posting submissions to the Net-Results form handler, you can leave your existing forms in place and continue to create more of them as needed, while taking full advantage of Net-Results’ automation capabilities.

Setup

Overview

First, you’ll create a Form in Net-Results to which you’ll send your form submissions. You do not need to publish this form on your website. It exists only to accept submissions, map submitted values to Net-Results standard and custom fields, and to trigger automated actions upon submission.

Then, when your non Net-Results form is submitted, post to the Net-Results form handler the fields you want Net-Results to absorb.

Net-Results will:

  • See a submission of the Net-Results form you created even though the form was never published anywhere
  • Create or update a Contact in Net-Results
  • Track a conversion
  • Make an entry in the Activity Stream
  • Trigger all actions you’ve chosen on the Form Actions tab

Details

Step 1: Create a form in Net-Results

  • This form will include all field values in which you would like collect in Net-Results.
  • If you would like to map these fields in Net-Results, please choose which fields to map each value to.
    • Have a custom field on this form you would like to map to Net-Results? Create a new Custom Field to catch this data!
  • Set up any Form Actions would you like to take place when this form is submitted, such as “Modify List Membership” or “Send Autoresponder Email”.

Note: You do not have to send over all fields. The only required field is an email address.

Step 2: Change each form field’s Element Name under the Advanced Tab of the Net-Results form to match the label for each field from the form on your site.

  • Not sure what the field labels are or where to find them?
    • Inspect the page in which your form is present. From here, hover over each form field to display their “field-name”
This image has an empty alt attribute; its file name is Screen-Shot-2022-03-16-at-2.08.09-PM.png
  • Once you have the labels for each field, under the Advanced Tab for each form field you would like to track in Net-Results, update the Element Name to match the field label from your form.

Step 3: Via the Forms URL in Net-Results, locate your Form ID.

  • This will be placed in the snippet of code to ensure the data from the form is being sent to the appropriate form in Net-Results.

Step 4: Have your Web Developer add any formFields you would like to send to Net-Results the snippet of code.

Below you will find an example code for how to accomplish this. That being said, this example code is not to be taken and used on your website, as we do not know if it will work on your website.

You will need a web developer on your side to review this example and implement the code using whichever syntax/language works with your website. This example is simply a guide for a web developer to understand what they need to do.

When you take this approach, it is also required that a mauuid (the cookie we set) be passed in the form data. We surface an easy function in our tracking beacon that allows you to grab that right in the browser.

<script>
    window.onload = function() {
nrformsubmit();
}
 
function nrformsubmit()
function getMauuid() {
	var count = 0;
	var id = setInterval(function () {
		if (count === 10) {
			clearInterval(id);
		}
		if (window.$__MA !== undefined) {
			clearInterval(id);
			return $__MA.getVisitorId().v;
		}
		count++;
	}, 30);
}
{
 
var obj = $__MA.getVisitorId();
 
var formFields = {
"FirstName": <map to First Name>, 
"LastName": <map to Last Name>, 
"EmailAddress": <map to Email Address>
"form_id": "enterFormIdHere",
"mauuid": obj.v
 
}
 
var form_data = new FormData();
 
for ( var key in formFields ) {
    form_data.append(key, formFields[key]);
 
}
 
$.ajax({
    url : 'https://apps.net-results.com/data/public/IncomingForm/Ma/submit',
    data : form_data,
    processData : false,
    contentType : false,
    type: 'POST'
}).done(function(data){
    console.log("completed")
});
}
    }
</script>
A Note From our Engineers

This function retries 10 times with a 30 millisecond delay between each try. This gives the web page up to 1/2 a second to finish loading/executing our tracking beacon. This will result in a higher success rate in retrieving the mauuid.

The Net-Results Tracking Beacon issues a unique identifier to each visitor. This Javascript-based beacon stores that unique identifier in a 1st party cookie in the browser.

Our Engineers recommend that you:
1. Add a hidden field to your form
2. Retrieve the Net-Results unique identifier with the above javascript
3. Set the mauuid that code will retrieve as the value of that hidden field

By doing this, your back end will receive the mauuid with each form submission. Add this mauuid field to the data you submit to our form handler. Please set the field name to “__mauuid” (please note: there are 2 underscores there).

Step 5: Place the updated snippet with appropriate fields and syntax on your site.

Once in place, any submissions on your site in which this code is present along with the Tracking Beacon will be sent to Net-Results.

Again, if any questions arise on this, please reach out to support@net-results.com and a member of our Customer Success Team will be happy to help.

Important Things to Know

Please see here A Note of Caution on Timing in Javascript.

Updated on October 16, 2023

Was this article helpful?

Related Articles