How To Implement Local Business Schema Through Google Tag Manager | Lillian Purge
Learn how to add LocalBusiness schema via Google Tag Manager, including JSON-LD examples, triggers, multi location setups, and testing.
How To Implement Local Business Schema Through Google Tag Manager
When people ask me how to implement LocalBusiness schema through Google Tag Manager, it is usually because they want the SEO benefits of structured data without touching their website code. I get it. Editing templates can be awkward, CMS access can be restricted, and developers are not always available when you need them. GTM feels like the clean workaround.
In my opinion, GTM can be a solid way to deploy LocalBusiness schema, as long as you do it properly. The key is to treat it like a technical implementation, not a quick copy paste job. If you publish messy JSON-LD, add conflicting markup, or inject it on the wrong pages, Google may ignore it or you can even create trust issues across your site.
This guide walks you through the process step by step, from deciding what you should mark up, to creating the JSON-LD, to deploying it through GTM, to testing and maintaining it. I will also cover multi location setups, dynamic variables, common errors, and the reality of what LocalBusiness structured data can and cannot do.
Throughout, I am going to stick closely to Google’s structured data rules and the LocalBusiness documentation, because eligibility and trust matter more than tricks.
What Local Business Schema Is In Plain English
LocalBusiness schema is a type of structured data that helps search engines understand key facts about a business, such as the business name, address, phone number, opening hours, and the services or categories it fits into. It is part of Schema.org, which is the shared vocabulary search engines use for structured data.
I always explain schema like this. Your website has information written for humans. Schema is the same information written in a machine readable format, so search engines do not have to guess what the information represents. When implemented correctly, it can help search engines display richer business information and connect your website more reliably with your business entity.
It is important to keep expectations realistic. LocalBusiness schema can support eligibility for certain search features and help Google interpret your business details more clearly, but it is not a ranking cheat code. Google is quite clear that structured data needs to be accurate, visible to users, and compliant with policies.
Why Use Google Tag Manager For Schema
I typically see three reasons people choose GTM:
You do not have access to the website code or templates
Your CMS makes it hard to add JSON-LD across the right pages
You want an easy way to update schema without redeploying the site
Google also documents a method for generating structured data with JavaScript and explicitly mentions GTM as a way to implement JSON-LD, which is helpful because it confirms this approach is valid when done properly.
That said, GTM is not automatically the best method. If you can add schema directly in the site templates, that is often simpler long term. GTM adds an extra layer, which means more things can go wrong if the container changes or if scripts are blocked by consent rules. Still, if GTM is what you have, you can do this well.
Before You Touch GTM, Get The Foundations Right
This is the part most people skip, then they wonder why nothing happens.
1) Decide which page should carry the LocalBusiness markup
For most single location businesses, I recommend putting LocalBusiness schema on the main contact page or the homepage, sometimes both, as long as the business details are clearly visible on those pages as normal HTML content.
If you have multiple locations, I strongly prefer a dedicated location page per site, with the correct address and phone number on that page, and the matching LocalBusiness schema injected only on that specific location page.
This matters because Google’s structured data guidance expects markup to match the visible content on the page. If you inject a Bedford address schema across every page but your site footer shows a different address or no address at all, you are creating inconsistency. That is the sort of thing that leads to structured data being ignored.
2) Confirm your NAP details are consistent
NAP means Name, Address, Phone number. I know this sounds basic but it is the number one reason LocalBusiness markup becomes messy. Your schema should match:
Your Google Business Profile details
Your website contact details
Your main citations and directory listings
If your phone number differs between the website and Google Business Profile, fix that first. Schema will not compensate for inconsistency.
3) Decide the business type, not just LocalBusiness
LocalBusiness is broad. Schema.org has more specific types under it, such as Restaurant, Dentist, MedicalBusiness, and so on. If a more specific type accurately matches your business, use it. Google’s LocalBusiness documentation also references using LocalBusiness structured data for business details, so choosing an appropriate type helps with clarity.
I do not recommend inventing categories or picking a type that feels aspirational. Stick to what you actually are.
What Properties Matter For LocalBusiness Schema
Schema can get deep quickly, so I am going to focus on what I see working well in practice while staying aligned with Schema.org definitions and Google guidance.
At a minimum, you will usually include:
@context
@type
name
url
telephone
address
openingHours or openingHoursSpecification
image or logo
sameAs
Schema.org defines LocalBusiness and related properties, plus OpeningHoursSpecification is available for structured opening hours.
Google’s LocalBusiness structured data page explains that this markup can help provide details like business hours and departments.
In my opinion, the biggest wins are consistency and completeness. It is better to have a clean accurate schema block that reflects reality than a massive block stuffed with fields you cannot keep up to date.
The JSON-LD You Will Inject Through GTM
Here is a solid single location example you can adapt. Replace everything in capitals with your real details. Make sure the same information is visible somewhere on the page.
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "LocalBusiness", "name": "YOUR BUSINESS NAME", "url": "https://www.yourdomain.co.uk/", "telephone": "+44XXXXXXXXXX", "image": "https://www.yourdomain.co.uk/path-to-image.jpg", "address": { "@type": "PostalAddress", "streetAddress": "STREET ADDRESS", "addressLocality": "TOWN OR CITY", "addressRegion": "COUNTY OR REGION", "postalCode": "POSTCODE", "addressCountry": "GB" }, "openingHoursSpecification": [ { "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday","Tuesday","Wednesday","Thursday","Friday"], "opens": "09:00", "closes": "17:30" } ], "sameAs": [ "https://www.facebook.com/YOURPAGE", "https://www.linkedin.com/company/YOURPAGE" ] } </script>
Two practical points from experience:
Use GB for the UK in addressCountry
Use a proper international phone number format if you can, it reduces ambiguity
If you have multiple opening hour patterns, add more OpeningHoursSpecification entries. Schema.org’s OpeningHoursSpecification supports this structured format.
Step By Step: Add LocalBusiness Schema In Google Tag Manager
Google’s own guide for generating structured data with JavaScript gives a straightforward GTM approach: create a Custom HTML tag, paste a supported structured data block, publish, then test.
I am going to translate that into a real world GTM workflow that avoids common mistakes.
Step 1: Open your GTM container and create a new tag
Go to Tags, click New, then choose Tag Configuration.
Select Custom HTML.
Step 2: Paste your JSON-LD script into the tag
Paste the full script block, including the opening and closing script tags.
In GTM, it will look like this:
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "LocalBusiness", "name": "YOUR BUSINESS NAME", "url": "https://www.yourdomain.co.uk/", "telephone": "+44XXXXXXXXXX", "address": { "@type": "PostalAddress", "streetAddress": "STREET ADDRESS", "addressLocality": "TOWN OR CITY", "addressRegion": "COUNTY OR REGION", "postalCode": "POSTCODE", "addressCountry": "GB" } } </script>
I usually start with a minimal valid version, publish, test, then expand fields once I know the base implementation is clean.
Step 3: Choose the right trigger
This is where people wreck the implementation.
If you have a single location business and your NAP is consistent site wide, you can trigger on All Pages.
If you have multiple locations, do not trigger on All Pages. Trigger only on the relevant location page.
For a single location contact page only, do:
Trigger type: Page View
This trigger fires on: Some Page Views
Condition: Page Path equals /contact/ (or your actual path)
If you are unsure of your paths, use Preview mode and check the Page Path value.
Step 4: Save the tag with a clear name
Name it something like:
Schema | LocalBusiness | Contact Page
Clear naming matters because six months later you will forget what you did and so will anyone else.
Step 5: Preview and debug
Click Preview in GTM, enter your website URL, and connect.
Load the page where the schema should appear.
Then open the page source or use dev tools Elements panel to confirm the JSON-LD script appears in the HTML after GTM loads.
You can also check in the GTM preview panel that the tag fired on the correct page and did not fire on the wrong pages.
Step 6: Publish the container
Once you have confirmed it is firing correctly, submit and publish the GTM container.
Testing Your Schema Properly
Testing is not optional. It is the difference between doing schema and thinking you did schema.
Google recommends testing your implementation after deploying structured data with JavaScript.
Here is the testing workflow I use.
1) Rich Results Test
Use Google’s Rich Results Test for the URL you implemented schema on. This checks eligibility for rich results and highlights errors.
Be aware that LocalBusiness schema does not guarantee a specific rich result in standard blue links. Sometimes the benefit is interpretive rather than visual. Still, errors matter.
2) Schema Markup Validator
Use the Schema Markup Validator to confirm the JSON-LD is valid Schema.org structured data.
If you see parsing errors, it is usually one of these:
Trailing commas
Smart quotes copied from a document
Invalid JSON formatting
A GTM variable injecting broken characters
3) Search Console enhancements and results
Over time, Google Search Console can show structured data reports for certain types. Not all schema types produce a dedicated report. Even if you do not see a special report, the schema can still be read and used.
Also keep an eye on indexing and crawl behaviour. If you inject schema on thousands of pages with unnecessary complexity, you can create maintenance overhead with no real benefit.
Should You Use LocalBusiness Schema On Every Page
This is a question I get a lot and my answer is, sometimes, but not blindly.
If you are a single location business and your business details are visible consistently across the site, placing LocalBusiness schema site wide can be fine.
If you are multi location, site wide LocalBusiness schema is usually a mistake unless it is configured dynamically so each location page gets the correct business entity information.
The risk is simple. If Google sees multiple conflicting entities across the same domain, it can reduce confidence. Clear entity signals win.
Multi Location Setup Through GTM
This is where GTM becomes more powerful than hard coding, because you can make the schema dynamic.
There are two main approaches I use.
Approach A: One tag per location page
This is the simplest and most robust approach.
You create one Custom HTML tag per location page, each with the correct LocalBusiness schema and each triggered only on that location page.
It is not elegant but it is reliable.
If you have 5 to 20 locations, this is usually fine.
If you have 100 locations, this becomes painful.
Approach B: One dynamic tag using lookup tables or page variables
This is the scalable approach.
You set up a system where GTM detects which location page is loaded, then injects the matching schema.
You can do this using GTM variables plus a Lookup Table variable that maps Page Path to address details, then output those details into the JSON-LD.
A common pattern is:
Use the built in variable Page Path
Create a Lookup Table variable for the business name, phone, street, locality, postcode
Use those variables inside your JSON-LD script
The REQ guide describes building variables and then inserting them into the schema with GTM’s double curly bracket syntax.
If you want to go even further, you can generate the JSON-LD as a script element using JavaScript, which some technical SEO teams prefer. Go Fish Digital shows a dynamic schema approach using createElement and script.type = "application/ld+json".
I will keep this practical and show the lookup table method first because it is easier for most teams to maintain.
Dynamic LocalBusiness Schema With GTM Variables
Step 1: Enable built in variables
In GTM go to Variables, then Configure.
Enable:
Page URL
Page Path
Page Hostname
Step 2: Create lookup table variables for your location data
Create a new variable:
Variable type: Lookup Table
Input variable: {{Page Path}}
Then create rows like:
If Page Path equals /locations/bedford/ then output Bedford address line
If Page Path equals /locations/milton-keynes/ then output MK address line
You will likely need multiple lookup tables, one for streetAddress, one for addressLocality, one for postalCode, one for telephone, and so on.
Yes it is repetitive. That is the cost of doing this inside GTM without a backend data layer.
If you have dozens of locations, I prefer pushing location data into the page dataLayer and reading it in GTM, but that requires developer support.
Step 3: Insert variables into your JSON-LD
In your Custom HTML tag, you would use GTM variables like this:
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "LocalBusiness", "name": "{{LB - Name}}", "url": "{{Page URL}}", "telephone": "{{LB - Telephone}}", "address": { "@type": "PostalAddress", "streetAddress": "{{LB - Street}}", "addressLocality": "{{LB - Locality}}", "addressRegion": "{{LB - Region}}", "postalCode": "{{LB - Postcode}}", "addressCountry": "GB" } } </script>
Then you set the trigger to fire only on location pages, for example Page Path contains /locations/.
Step 4: Test each location page
This is where people get lazy and end up shipping broken schema to half the site.
Test several location URLs manually in Preview mode.
Check the JSON-LD output is correct on each page.
Then validate with Rich Results Test and Schema Validator for at least a few locations.
The Data Layer Method For Cleaner Scale
If you have developer access, I genuinely think the cleanest scalable approach is pushing location details into the dataLayer, then letting GTM build schema from that. It reduces lookup table chaos.
Google’s guidance on generating structured data with JavaScript supports the idea of generating JSON-LD dynamically, as long as it is valid and testable.
A simple dataLayer example a developer can add per location page might look like this:
<script> window.dataLayer = window.dataLayer || []; window.dataLayer.push({ "locationName": "Your Business Name Bedford", "locationPhone": "+441234567890", "locationStreet": "1 High Street", "locationLocality": "Bedford", "locationRegion": "Bedfordshire", "locationPostcode": "MK40 1AA", "locationUrl": "https://www.yourdomain.co.uk/locations/bedford/" }); </script>
Then in GTM you create Data Layer Variables for each of those keys and inject them into the JSON-LD template.
This is far easier to maintain if you are managing many locations.
Where People Go Wrong With GTM Schema
I want to be blunt here because this is where wasted months happen.
They inject schema that does not match visible content
Google’s structured data guidelines emphasise that markup should be accurate and follow content policies. If your markup claims reviews or opening hours that are not shown on the page, you are inviting Google to ignore it.
They mix multiple entity markups incorrectly
If you have Organisation schema, LocalBusiness schema, and Service schema all claiming slightly different names and addresses, you are telling Google conflicting stories.
They fire LocalBusiness schema on blog posts and random pages
For a single location site this is sometimes fine, but if your NAP is not visible or differs between pages, it becomes a mess quickly.
They rely on outdated tools or ignore testing
Google’s documentation is actively updated and features can change over time, which is another reason testing matters.
They expect instant ranking jumps
Schema is a clarity and eligibility tool. It is not a magic wand. Your content, reputation, and local presence still matter.
Does LocalBusiness Schema Help With Google Business Profile Rankings
This is another common question.
LocalBusiness schema can support consistency and entity understanding, but Google Business Profile ranking factors include proximity, relevance, and prominence. Schema can help with relevance signals and consistency, but it cannot override proximity and it cannot replace reviews and real world prominence.
In my opinion, schema is part of a complete local SEO foundation, not the foundation by itself.
How To Keep Schema Maintained Over Time
This is the unsexy part that makes or breaks the implementation.
If your opening hours change and you do not update schema, you create inaccuracy.
If your phone number changes and you update the website but forget the GTM schema, you create inconsistency.
I recommend a simple maintenance habit:
Whenever NAP changes, update website, Google Business Profile, key citations, and GTM schema together
Every quarter, re test a few key URLs in Rich Results Test
Keep a changelog note inside GTM container versions describing what you changed
It sounds basic, but it prevents silent drift.
A Practical GTM Checklist I Use Before Publishing
I use this checklist because it catches nearly every problem:
The schema fires only where it should fire
The schema matches visible content on the page
The JSON is valid with no trailing commas
The business type is accurate
Address fields are correct and consistent with GBP
Opening hours reflect reality
Rich Results Test shows no critical errors
Schema Validator shows no syntax errors
Multi location pages output unique correct data per URL
If you do all that, you are in a very strong place.
Final Thoughts
Implementing LocalBusiness schema through Google Tag Manager can be a great option when you want control without touching the website templates. Google documents GTM as a valid approach for generating structured data, but the outcome depends entirely on accuracy, targeting, and testing.
From experience, the biggest wins come from simple clean schema that matches what users see, is deployed to the right pages, and is maintained alongside your core business details. If you treat schema as a living part of your local SEO foundation rather than a one off task, it supports stronger visibility and clearer trust signals long term.
Maximise Your Reach With Our Local SEO
At Lillian Purge, we understand that standing out in your local area is key to driving business growth. Our Local SEO services are designed to enhance your visibility in local search results, ensuring that when potential customers are searching for services like yours, they find you first. Whether you’re a small business looking to increase footfall or an established brand wanting to dominate your local market, we provide tailored solutions that get results.
We will increase your local visibility, making sure your business stands out to nearby customers. With a comprehensive range of services designed to optimise your online presence, we ensure your business is found where it matters most—locally.
Strategic SEO Support for Your Business
Explore our comprehensive SEO packages tailored to you and your business.
Local SEO Services
From £550 per month
We specialise in boosting your search visibility locally. Whether you're a small local business or in the process of starting a new one, our team applies the latest SEO strategies tailored to your industry. With our proven techniques, we ensure your business appears where it matters most—right in front of your target audience.
SEO Services
From £1,950 per month
Our expert SEO services are designed to boost your website’s visibility and drive targeted traffic. We use proven strategies, tailored to your business, that deliver real, measurable results. Whether you’re a small business or a large ecommerce platform, we help you climb the search rankings and grow your business.
Technical SEO
From £195
Get your website ready to rank. Our Technical SEO services ensure your site meets the latest search engine requirements. From optimized loading speeds to mobile compatibility and SEO-friendly architecture, we prepare your website for success, leaving no stone unturned.
With Over 10+ Years Of Experience In The Industry
We Craft Websites That Inspire
At Lillian Purge, we don’t just build websites—we create engaging digital experiences that captivate your audience and drive results. Whether you need a sleek business website or a fully-functional ecommerce platform, our expert team blends creativity with cutting-edge technology to deliver sites that not only look stunning but perform seamlessly. We tailor every design to your brand and ensure it’s optimised for both desktop and mobile, helping you stand out online and convert visitors into loyal customers. Let us bring your vision to life with a website designed to impress and deliver results.