SEO
Structured Data (JSON-LD): Practical Patterns for Agencies
How to implement and maintain JSON-LD for Article, Product, and local business without breaking or duplicating.

Structured data in JSON-LD tells search engines what your page is about and can unlock rich results. Doing it in a consistent, maintainable way avoids errors and duplication.
Where to put JSON-LD
Emit JSON-LD in a <script type="application/ld+json"> in the document head or body. One script per graph (or one script with an array of objects) is fine. Generate it server-side so it’s in the initial HTML; don’t rely on client-only rendering for critical schema. In Next.js, use the metadata API or a layout/page component to inject the script; in WordPress, use a plugin or theme output. Validate with Google’s Rich Results Test and Search Console after deployment.
Article and blog posts
For blog posts, use the Article type (or NewsArticle for news). Include headline, datePublished, dateModified, author (Person with name and optionally url), image (URL to a representative image), and publisher (Organization with name and logo). Pull values from your CMS or frontmatter so you’re not hand-writing per post.
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Your Post Title",
"datePublished": "2026-02-01",
"dateModified": "2026-02-01",
"author": { "@type": "Person", "name": "Yasir Haleem" },
"publisher": {
"@type": "Organization",
"name": "Your Site",
"logo": { "@type": "ImageObject", "url": "https://yoursite.com/logo.png" }
},
"image": "https://yoursite.com/post-image.jpg"
}Keep one Article block per page; don’t duplicate the same entity in multiple scripts unless you’re expressing different relationships.
Product and local business
For product pages, use Product with name, image, description, and offers (price, availability). For local businesses, use LocalBusiness and include address, phone, and opening hours if accurate. Only add properties you can keep accurate; wrong or outdated data can hurt trust. Use a shared helper or component that takes props and outputs valid JSON-LD so you don’t scatter schema logic.
Avoiding duplication and errors
Don’t output the same entity twice with conflicting data. Merge or reference: e.g. one Organization at the site level and reference it by @id in articles. Validate regularly; fix required property errors and remove deprecated types. For agencies, document which types you use and where they’re generated so client sites stay consistent and maintainable.
Summary
Output JSON-LD server-side in a script tag; validate with Google’s tools. Use Article for posts with author and publisher; use Product or LocalBusiness when the page matches. One source of truth per entity, keep data accurate, and document patterns so structured data stays practical for agencies.