Skip to content

HubSpot & Magento Integration – Using Forms & Emails to Boost Sales, Convert Leads & Improve Customer Experience

the Hubspot logo and a graphic of a checklist to depict Hubspot & Magento Integration
Featured Technology

Integrating your website, ERP, CRM and more can save you time and make you more money. In this post we discuss...


What is HubSpot & what do you use it for?

HubSpot is a CRM, a customer relationship management platform, that companies use to manage their relationships with customers. The platform is customer-centric, meaning that all information about sales, marketing and communication will link to their relevant customers, storing all data for that customer in one place. 

CRMs like HubSpot are typically focused on and marketed as sales tools. However, they also allow their users to deliver excellent customer service and account management, attract new customers and convert leads.

There are many ways to integrate HubSpot and Magento. It’s very customisable and every organisation’s setup can be unique to their processes. We will show you two easy ways to make the most of a Hubspot & Magento integration, helping you bring valuable information from Magento to enable your internal processes to become more efficient whilst also improving your customer service.

Using custom forms with Magento

What are HubSpot forms?

HubSpot forms are a powerful and useful gathering tool, allowing you to create forms for submission that can be customised, styled and created like any other form on a website. They can then be added to a website through a code snippet. Once in place, when the form is filled out, all information within it will be sent back to HubSpot. By using the email address attribute, this information will be stored against existing customers or can create new leads. 

What can you use HubSpot forms for?

There are almost no limits to what you can use HubSpot forms for, and we’d advise you to use them in as many places as possible. But a rule of thumb is to use them whenever the amalgamation of data, paired with a relevant customer is beneficial.

Some use cases we’ve seen are:

  • Capturing new leads and inquiries
  • Receiving quotes and inbound requests
  • Customer feedback 
  • Complaints
  • Product requests such as spare parts and warranties
  • Newsletters
  • Delivery change requests
  • Credit applications

How to embed custom forms in Magento?

Adding an embedded form in Magento has become easy with the addition of the page builder, added in August 2021 to Magento version 2.4. For any CMS page or static block, essentially anywhere the page builder can be used, simply open the page builder, add an HTML element, and paste the code. Once you’ve saved this the form should appear and function normally like any other form.

To add the forms to non-CMS pages without access to the page builder, you will either need to add the code to a widget and place it onto the page or have a developer add it to the front end using code.

Hubspot & Magento integration - data flow code embed flowchart
Data Flow Code Embed

How to capture any form in HubSpot

Requirements for forms

You can gather input and user data from forms that are not HubSpot’s custom forms, however, there are a few conditions.

The form must fit the following criteria

  • Be a static HTML form.
    This is because the technology involved is designed to detect the standard format of HTML. Other technologies can be difficult to monitor and have less standard formats.
  • Be wrapped in HTML <form> tags.
    This is because the script used by HubSpot uses the <form> tags to detect the fields it is monitoring. Without these tags, the HubSpot code doesn’t know the start and the end of the fields it needs to pay attention to.
  • Not be in an <iframe>.
    iframes display code from other places, this means that the location and the details will be skewed by what is used via an Iframe.
  • Have an email input field.
    The email field is the only real way for HubSpot to link customers to the person filling in the form. This allows your form information to be sorted and stored against the right people.
Hubspot & Magento integration - data flow adding code to functioning forms flowchart
Data Flow – Adding Code to Functioning Forms

What to take note of when tracking non-HubSpot forms

The trigger to send the data on non-HubSpot forms is the submit button. This can cause multiple submissions if the form has customer validation. For instance, if a customer does not fill in a required field and clicks the submit button, the data will be sent to HubSpot but the customer will need to fill the form in again resulting in multiple submissions.

The tracking of non-HubSpot forms is done by Javascript. If there are conflicts or issues with Javascript on the pages, it may not correctly run the code to track the data. This can also be blocked if the customer is using a security extension that blocks Javascript.

A cookie is created when the customer visits the page and the submissions are based on this cookie. If the customer uses different accounts to fill in the same form, it will still be associated with the initial email address, unless they change device or clear their cookies.

Implementing form tracking on non-HubSpot forms

Implementing form tracking on non-HubSpot forms is relatively simple, but will require some additional code for your site. The installation of the HubSpot tracking code will allow you to instantly start collecting from non-HubSpot forms. You simply copy and paste their tracking Javascript to the correct part of your site. 

For more detail follow this useful Hubspot tracking guide.

How to get all emails sent by Magento into HubSpot

What is your HubSpot tracking email and where to find it?

The HubSpot tracking email is a clever technique to help you keep track of all email correspondence. It is a unique email attached to your HubSpot account, that when cc’ed or Bcc’d into an email ( we recommend BCC), will record and sort the correspondence by recipient and sender. 

  1. Simply log in to your HubSpot account, click settings in the top right corner, and then select objects from the left-hand side menu.
  2. Then click the activities section
  3. Then click the email tacking tab. 
  4. Scroll down and you’ll find your BCC address.
  5. This is the address, that when added to an email, will copy into your HubSpot account that will then sort and store the information and responses.
HubSpot & Magento Integration - Using Forms & Emails to Boost Sales, Convert Leads & Improve Customer Experience
How to find your Hubspot tracking email

Have a developer add the tracking to emails

HubSpot emails are incredibly useful and help keep all communications in one place. This means that anything connected to them tracks all related emails to the customer against their HubSpot account. This can be even more effective when you can see a customer’s email activity from an eCommerce store like Magento. Seeing when a customer signs up, makes an order, and receives the same tracking email emails they do can take your customer service to the next level.

One way to track these emails is to have a developer manually cc the HubSpot tracking emails for your account to every email through the code. With this done, any email sent to a customer will be stored against that customer as communication within your customer account. Now you have a detailed history of your client’s interaction with your website, their orders, and what information they’ve received from you and your services.

How to add the code to emails yourself the easy way 

Most emails in Magento can have a BCC added to them in from the Admin dashboard. If, for example you go to:

admin -> stores -> config -> sales -> sales emails

You can find the configs for each type of sales email. Simply add your HubSpot address to the ”send order email copy to field” and select BCC in the “send order email copy method” field, and your emails will be automatically tracked by HubSpot.

HubSpot & Magento Integration - Using Forms & Emails to Boost Sales, Convert Leads & Improve Customer Experience
Adding the code to emails

Using HubSpot forms to create support tickets for your Magento store

Using HubSpot forms, the ability to create a dedicated support or sales ticketing pipeline for your Magento store opens up a whole host of opportunities and use cases. 

For example, you can set up different customer journeys such as specialised sales enquiries, warranty and booking enquiries, support enquiries or anything else you could need. 

Once created these pipelines can be optimised to ensure that the customers will receive the best service and that your staff can perform optimally for every scenario.

The benefits of Hubspot transactional emails

  • Fast and easy to set up.
  • Automatically send receipts, account updates and customer service emails. 
  • Measure your email performance by sending your marketing and transactional email through HubSpot. 

The time and efficiency savings alone from using transactional emails with Magento are a huge benefit for businesses looking to streamline and automate their processes. 

Whether for sales, support, aftercare or general account management, having all communications in one place gives your staff the tools they need to be able to respond quickly to your customer’s needs, without ever having to log in to the Magento dashboard. 

From sales and account management, through to aftercare and support, combining Hubspot forms and emails with your Magento store will help you make efficiencies and deliver great service while attracting new customers and converting more leads. 

It’s relatively simple to get started so we highly recommend you give Hubspot a try. 

Need help with a Hubspot integration for your eCommerce business?  With our Hubspot expertise, we can help you create a seamless customer experience that drives more sales, converts more leads and boosts loyalty. Get in touch today and let’s make it happen.