How to transfer email addresses from website form to InSend?

Many online stores already have a separate form on the website for collecting email addresses and you need to set up data transfer to InSend. For example, to send an email after filling out a form or to merge the collected data into one system.


Let us break this process down into several sequential steps.

  1. First you need to create a new event in InSend under Settings - "Custom events" - "New event".

Let's call this event "Form Submission" with the key "send_form".

  1. Add the following code to the Submit button code (select first run java script)

<button ... onclick="insend('event', 'custom', {key: 'send_form'}, { email: $(this).parents('form').find('input[type=text]').val() });" ... >Send form</button>

  1. Then create a segment in InSend with the condition "Event - Form Submission - Occurred". This action identifies those who have filled in this particular form.

Transfer of custom parameters

If additional data about the user is collected in the subscription form, it must be added to the code.

For example, a customer fills in the following fields: First Name, Last Name, Campaign, Email and Phone. The code then looks like this:

insend('event', 'custom', {key: 'send_form'}, { first_name: $(this).parents('form').find('input[name=name]').val(), last_name: $(this).parents('form').find('input[name=lastname]').val(), company: $(this).parents('form').find('input[name=company]').val(), email: $(this).parents('form').find('input[name=email]').val(), phone: $(this).parents('form').find('input[name=phone]').val() });

If сompany is a custom field, you must create it first. Just like the custom event send_form. If no trigger is required for this event, but only information about the visitor needs to be written, you can use the default event update_info instead of send_form.

Attention! The correct replacement values from the form to the code are configured individually. Contact technical specialists to check and adjust the code.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.