A CDN for Hooray Agency’s advanced SEO hospitality clients.
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.
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) {}
script
tag.head
of the website (globally). Ensure the type
is set to module
.
<!-- START: Hooray Schema Markup Framework -->
<script
type="module"
src="https://schema.hooray-seo.com/script.js?domain=">
</script>
<!-- END: Hooray Schema Markup Framework -->
domain-code
with your unique code at the end of the script src
to query the correct structured data input map.header.php
files.