Sending contact information from Web Forms into Triggerbee

If you have a form on your website, you can use Javascript to pass contact information from the form into Triggerbee. 

You can either add data to the Contact or Session objects in Triggerbee.

The Contact object is good for storing long term data that describe the person.

The Session object is good for storing short term data.

These data properties can then be used in automations and added to a CRM or email platforms. 

Example Form:

If we look at the form above, it contains four fields: Name, Email, Gender, and Message.

We would want to store Name, Email, and Gender in the Contact object in Triggerbee. 

The Message can be placed in the Session object

 The default data model of Triggerbee supports Name and Email field by default, but Gender will need to be added. Here are instructions on how you can do that.

Once Gender has been added to the Contact object we can simply script all the properties to the mtr_custom.session object, like the following example:

var mtr_custom = mtr_custom || {};
mtr_custom.session = mtr_custom.session || {}; = document.forms[0].elements["email"].value; = document.forms[0].elements["name"].value;
mtr_custom.session.gender = $('input[name="gender"]:checked').val(); // NOTE! Requires Jquery! 
mtr.goal("Personal Shopping Enquiry Form!"); 
window.mtr_custom = mtr_custom; // Make sure the mtr_custom object is accessible in the global space by the mtr-logger

Use Form Data in Automations

Read more about using form data in your automations  here

Did this answer your question? Thanks for the feedback! Please reach out to [email protected] if there's anything you'd like to add. There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us