Skip to content

Adding your HubSpot tracking code for WordPress

Have you recently integrated HubSpot with your WordPress website? Do you have a keen eye for data and monitoring performance on assets such as blog posts, landing pages and website pages.? If so, I’d highly recommend adding your HubSpot tracking code to your WordPress website. Here’s a breakdown of the steps you need to follow.

First off — where can you find your tracking code in HubSpot?

So you’ve made your cuppa and logged into HubSpot. The first step is to click the settings icon settings in the main navigation bar. Next, hover over the tracking & analytics settings and give that a click.

The next step will vary depending on what type of HubSpot account you have. In accounts that only have access to Marketing Starter or HubSpot’s free tools, navigate to tracking code in the left sidebar menu.

Navigate to tracking & analytics for all other subscriptions and then tracking code in the left sidebar menu.

Depending on who’ll install the tracking code, head to the embed code section, click copy or email to my web developer. This will send the tracking code to the team member who’ll install it on your website.

 

Job done — but where do I install the tracking code on my WordPress site?

Nice work. It’s now time to add the HubSpot tracking code to your WordPress site. The first step is to log in to your WordPress account. Next, in the left sidebar menu, navigate to appearance and then editor

Once you’re there, select your footer in the list of theme files on the right side of the editor. Then paste in the tracking code and click update file. You now should be all set. 

 

How does the HubSpot tracking code work?

Once your HubSpot tracking code is successfully added to your WordPress site, HubSpot will then start to actively track visitors using browser cookies. 

Each time someone visits your website, HubSpot will check for an existing tracking cookie. If one doesn’t exist, a cookie will be associated with that visitor and will log every page they visit moving forward.

The code can also be used to track any form submissions that feature on your WordPress site and automatically update contact records in your HubSpot CRM. This is a huge benefit when it comes to keeping track of your contact and lead data.

HubSpot will associate their previous page views based on the tracking cookie if and when a visitor fills out a form. If the email address filled in the form is associated with an existing contact, this visitor will be identified as the contact. 

 

But what if we told you there was an even better way to capture form submissions?

Well, you’re in luck. The answer lies in multi-step forms. This is a long form broken into multiple pieces. Instead of facing one big, long, intimidating looking form, they’re designed to allow customers or leads to provide you with their personal information in stages.

Not only are they great for improving your website user experience, but they’re also proven to increase conversions too. The numbered steps orientate the page visitor and, in many cases, lead to more submissions.

hubspot multi step form

Discover more about the multi-step form, how it works in practice and how it can make a big difference when it comes to increasing form submissions on your website below.