Integrating Hubspot forms with aNinja

You are here:
< All Topics

In this article, we show you how integrating the Hubspot forms with aNinja can be done in 2 steps.

The integration allows you to forward leads into your aNinja account simply using a programming code or an API. Which allows you to augment the number of your leads.

1- In Hubspot Marketing Hub, Edit your page, then, go to page Settings > Advanced Options.

2- In Footer HTML add the following Javascript (here, you will need to adapt the code to your form and use your aNinja API key).

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js”></script>
<script>

$(document).on(‘submit’,’form’,function(){
var contact_name = $(“input[name=’firstname’]”).val() +” “+$(“input[name=’lastname’]”).val();
var contact_email1 = $( “input[name=’email’]”).val();
var contact_phone1 = $( “input[name=’phone’]”).val();

    $.ajax({
        type: 'POST',
        url: "https://aninja.com/api/v1/contactform/?apikey=YOUR_ANINJA_API_KEY_HERE",
        data: {
            'contact_name': contact_name,
            'contact_email1': contact_email1,
            'contact_phone1': contact_phone1,
            'your-comments': 'From my Hubspot form'
        },
        success: function (data) {
            console.log('[Info] aNinja form submitted successfully');
        }
    });
});

</script>

  • Also, check if your Hubspot plan offers Workflows. If so, you can post the Form submission to aNinja through a Workflow webhook in Hubspot.

Where does the imported data appear?

After the integration, you can search your aNinja CRM for the imported leads. You can also search for any custom field, opportunities, and any other info that is collected from the forms.

  • Lead’s contact appears in the leads contact section in the lead view
  • Opportunities also appear in the opportunity section in the lead view
  • The company’s info appears on the top left of the lead view, in the Company section.
  • Custom fields appear in the custom field section of the lead view
  • Lead Search is a field that also appears in the bottom left of the lead view. Specifically, these are info/links on the lead or the organization found in Google search.

Need help integrating Hubspot forms with aNinja? Leave us an email at support@aninja.com. We’re more than happy to assist you.

Table of Contents