Skip to main content

Implementing Structured Data

📘 This article covers editing existing structured data (JSON-LD) on a page, or adding a new structured data block, with PageWorkers.

Overview

The Page Editor optimization type in PageWorkers manages SEO tags and other HTML elements on your pages, including structured data. When you provide a test URL that already has structured data on it, PageWorkers detects which schema types exist and lets you modify them: you describe only the keys you want to add, override, or remove, rather than rewriting the entire block. You can also add a new structured data block to a page that does not have one yet. A preview panel shows the resulting JSON-LD in real time as you edit, and your changes can reference the page's own content through variables.

Configuring the optimization

  1. Create a PageWorkers optimization using the Page Editor type. When you choose a page to test and preview, PageWorkers identifies any structured data found on the page.

    Structured data types found on selected page
  2. On the Configure step, determine if you want to add a new structured data block or edit existing structured data.

Adding structured data

You can add new structured data blocks and edit existing structured data within the same optimization.

To add a structured data block:

  1. In the "Elements to update" section, expand the "Add an element" dropdown, then select Add structured data. A new element is added, labeled "New structured data" by default.

    Add new structured data menu selection in PageWorkers optimization
  2. In the "Define your structured data" field, write the complete JSON-LD block, identifying at least the @context and @type, and including the opening and closing braces. PageWorkers will add the structured data to the pages within scope exactly as written here.

  3. If PageWorkers validates the JSON-LD, click Next to finish creating the optimization.

👉 PageWorkers validates the JSON-LD immediately. Any errors found are displayed below the "Define your structured data" field, and you cannot proceed with the optimization until you resolve them.

Editing structured data

You can edit existing structured data found on the test page and add new structured data blocks within the same optimization.

To edit existing structured data:

  1. In the "Elements to update" section, expand the "Add an element" dropdown, then select the type of structured data to edit. PageWorkers automatically creates a variable for the selected structured data type and opens the structured data in the preview panel.

  2. In "Define your [Type] modifications" field, identify the keys to change in JSON-LD format. For example, { "name": null, "test": "hello" } removes the existing name key and adds a new test key. You must define variables in advance to see their values in the preview.

    💡 You can copy from the preview window to the editor.

  3. Check the preview panel to confirm the merged result before continuing.

Validate before deploying

Validate the generated JSON-LD in a third-party tool, such as Google's Rich Results Test. Paste the code from the "Structured data preview" panel and click Test Code. Cross-reference Google's structured data documentation for the schema type you are editing to confirm the properties used are recommended ones (e.g., a complete address object for an Organization).

Did this answer your question?