SEO-Schema

Hooray Schema Markup Framework

A CDN for Hooray Agency’s advanced SEO hospitality clients.

Context

Schema markup (aka structured data) is often difficult to manage at scale. As a site’s (or sites’) content base grow & change, so should (ideally) the schema markup code. This is a challenge for many SEOs, as the schema markup is often hard-coded into the site’s HTML, and often page-by-page.

To address this, we’ve built a CDN that delivers a structured data framework to a website via a single script tag. This script tag queries a central repository, deploying a structured data framework to each page differently based on the page’s content.

Features

function QuantitativeValue(room) {
    
    const roomCount = room?.numberOfRooms || room?.roomCount || null;
    if (!roomCount) return;
    
    return {
        '@type': 'QuantitativeValue', // https://schema.org/QuantitativeValue
        '@id': id('QuantitativeValue', room.name + '-' + roomCount),
        'url': room.url || hotel.homepage, // the hotel object is accessible via inherited scope
        'unitText': room.name,
        'value': roomCount,
        'partOf': Product(room),
    }
}

function Product(room) {}

Benefits

Implementation

Notes

To Do

Credit (or blame)