Digital Marketing Blog | CommonMind

How We Built a Reusable LocalBusiness Schema Module in HubSpot

Written by Marina Milutinovic | Jul 17, 2026 12:27:03 PM

If your business has multiple locations, adding LocalBusiness schema to every page can quickly become a maintenance headache.

You could copy and paste JSON-LD onto every location page, but that means updating code every time a phone number changes, a new location opens, or Google introduces a new recommended property.

When we migrated a client's multi-location website to HubSpot, I wanted a solution that was easy to maintain—not just for our team, but for the client as well.

The answer was a reusable custom module.

In this article, I'll show you how we built it and why it's become my preferred way to manage LocalBusiness schema in HubSpot.

What about Organization and WebSite schema?

Before we get into LocalBusiness schema, it's worth mentioning two other schema types that almost every business website should have.

Organization and WebSite schema belong on your homepage, not every page of your site.

The easiest approach is to generate the JSON-LD using a trusted schema generator or ChatGPT, then add it to your homepage's Head HTML in HubSpot.


Once those are in place, you can focus on the pages that actually need location-specific structured data.

Why build a reusable module?

If you only have one location, manually adding LocalBusiness schema to the page is perfectly reasonable.

But if you have five, ten, or twenty locations, maintaining separate JSON-LD for every page quickly becomes tedious.

Instead of copying and pasting schema onto every page, I built a reusable custom module that could be added to each location page and populated with location-specific information.

The biggest advantage is that the schema structure only has to be built once.

After that, adding a new location is simply a matter of adding the module to the page and filling in a few fields.

It also means clients can update business information themselves without editing JSON-LD.

Step 1: Create a custom module

In HubSpot, navigate to Content > Design Manager.

Create a new Custom Module and give it a descriptive name, such as LocalBusiness Schema.


Check "Site pages" for where you'd like to use the module and select "Local module" for the scope.

Step 2: Add the editable fields

Next, create fields for all of the information that changes from one location to another.

For our module, I added fields including:

Field Name HubSpot Field Type
Business name Text field
Description Rich text
Phone number Text field
Email address Email
Street address Text field
City Text field
State Text field
ZIP code Text field
Latitude Number
Longitude Number
Google Map URL URL
Opening hours Text field
Logo URL
Facebook URL URL
Instagram URL URL
LinkedIn URL URL
YouTube URL URL

These are the only values you'll update on each page. 



Step 3: Build the JSON-LD

With the fields in place, write the LocalBusiness schema using HubL variables instead of hardcoded values.

Each schema property references one of the module fields, so whenever you update a field, the JSON-LD updates automatically.

The schema itself only needs to be built once.

Important: The HubL code below is written to match the module fields in the table above. If you rename, remove, or add fields—or use different internal field names—you'll need to update the corresponding references in the code to ensure the schema is generated correctly. 











<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "@id": "https:\/\/www.commonmind.com\/blog\/how-we-built-reusable-localbusiness-schema-module-in-hubspot#localbusiness",
  "name": "null",
  "url": "https:\/\/www.commonmind.com\/blog\/how-we-built-reusable-localbusiness-schema-module-in-hubspot",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "null",
    "addressLocality": "null",
    "addressRegion": "null",
    "postalCode": "null",
    "addressCountry": "US"
  }
}
</script>

 

Step 4: Publish the module

After you've finished building the module, publish it.

From this point forward, it becomes available in HubSpot's page editor just like any other custom module.

Step 5: Add the module to a location page

Open one of your location pages in the page editor and add the new LocalBusiness Schema module. You can drag the module anywhere on the page since it's not visible on the frontend.

You don't need to touch the code again.

Step 6: Fill in the location details

Once the module has been added, complete the fields for that specific location.

For example:

Field Example
Business name CommonMind
Address 399 Boylston St
Phone number +1 6177651777
Description Brief description of the location
Latitude & Longitude Copy from your Google Business Profile
Opening hours Mo-Fr 09:00-17:00
Logo Public URL to your logo
Social profiles Facebook, LinkedIn, Instagram, etc.

Because the JSON-LD references these fields, the correct schema is generated automatically for that page.

Step 7: Validate your schema

Before publishing, validate your implementation using:

This helps catch syntax errors and confirms that search engines can read your structured data correctly.

Why I prefer this approach

After using this workflow on a multi-location website, I wouldn't go back to manually maintaining JSON-LD.

Building the module takes a little more time upfront, but it pays off every time you update a location or add a new one.

Some of the biggest benefits are:

  • The schema structure is created once and reused everywhere.
  • Every location follows the same implementation.
  • Updating business information doesn't require editing code.
  • Clients can make routine changes through HubSpot's page editor.
  • Adding a new location takes just a few minutes.

Final thoughts

HubSpot doesn't provide a built-in way to manage LocalBusiness schema across multiple pages, but creating a reusable module solves that problem nicely.

For a single location, manually adding JSON-LD may be all you need.

For multi-location businesses, though, a reusable module keeps your implementation consistent, makes updates much easier, and allows non-technical users to manage location information without worrying about the underlying schema.

It's one of those solutions that takes a little planning upfront but saves time every time you use it.