← Back to the dashboard

How to add structured data (3.2)

Structured data is a small block of code in a page that tells Google, in a fixed format, facts a person reads off the page: "this is a business at this address", "this is a video, posted on this date". Card 3.2 asks for four kinds: Organization, LocalBusiness, VideoObject and FAQ. Plan: 3.2-structured-data.md.

BlueBoost writes the code for you. Placing it on the site is a fix-list step, done by whoever edits the website.

1. Get the code

cd db && npm run schema

It takes about 5 minutes and writes a folder out/schema-<site>-<time>/:

Run it again after changing a fact or adding a video, and use the newest folder.

2. Check the business facts first

Organization and LocalBusiness are built from db/config/business-blueforest.json: name, address, phone, email, hours, logo, social profiles. Google may show these, so a wrong phone number here is a wrong phone number in search. Correct the file, not the pasted code, and change facts_version.

3. Place it

The code goes in the page's <head> (it also works in the body). Every website platform has a place for this, usually called "code injection", "custom code" or "head code", per page.

CodeWhereWhen
VideoObject (in each page's file)That pageNow, on any platform
Organization and LocalBusiness (in index.html)Home page onlyAfter the move off Squarespace. Squarespace already adds its own copies to every page; adding ours beside them gives Google two versions that disagree. On the new platform, make sure it doesn't add its own, then paste ours
FAQThe pages 5.2 namesAfter 5.2 writes the questions and answers

4. Check it worked

  1. Paste one page's address into Google's Rich Results Test. It should find the video (or the business) and report no errors.
  2. Run npm run schema again. That page's checks should now say "present".
  3. The next audit (npm run audit) stops counting that page in the VideoObject fix.