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.
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.
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.
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.
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 | |
| 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.
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>
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.
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.
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.
Before publishing, validate your implementation using:
This helps catch syntax errors and confirms that search engines can read your structured data correctly.
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:
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.