There are currently 3 different deployment options for schema markup created using the Highlighter:


  1. JavaScript

  2. Crawler

  3. JavaScript + WebHooks


Javascript

The Javascript option is a client-side deployment option that requires the placement of the following tag on every templated page of your website.

 <script src="https://cdn.schemaapp.com/javascript/highlight.js"></script> 

This tag is what will fetch and build the associated schema markup for each page. This is typically added via a Tag Manager or in your CMS's theme.


The schema markup is dynamically generated every time a visitor comes to that particular page and therefore the schema markup is always up to date. This is the most common deployment method and requires hardly any technical resources.


How it works:

The highlight.js is used to look up the page's configuration file using the URL of the page. It will inspect the HTML of the page determined by the Configuration file to find content, and then places the content into a JSON structure to represent Schema Class / Properties. Once called, it returns a combined JSON-LD data block into a script tag. 


Pros:

  • Immediate updates to schema markup

  • Durable integration method (most commonly used)

Cons:

  • AMP third-party JavaScript not supported


Crawler


This method is typically used for templates which have a low content update frequency. That is because the Schema Markup is only crawled and generated on a weekly cadence (or on any create/edit events).


Place the following code on every templated page of your site:

<script src="https://cdn.schemaapp.com/javascript/schemaFunctions.min.js"></script>
<script>schemaLoad("<ACCOUNT_ID>", "<API_KEY>");</script>


How it works:

Schema App's crawler (schema bot) will crawl the site page by page until it finds a page that matches the template's page set. Once found it will check whether its json-ld exists or matches a current version stored and if needed send out an update.


Pros:

  • Fastest HTML rendering

  • Schema App pre-generates data with a crawler

  • Supports AMP

  • Supported by Schema App CMS integrations

Cons:

  • Requires backend integration (unless using Schema App CMS integration)

  • Less frequently updated schema markup


JavaScipt + Webhooks 


With a hybrid approach, JavaScript generates the data and the data is sent to your server-side integration through a Webhook. Useful for sites with that change often and slower load times. The schema markup is generated on every page load much like the embedded Javascript but is sent to the backend. That means that the schema data is only as recent as the last visit.


You must first add an endpoint that supports Schema App's webhooks. (If using WordPress this will be done for you). Next, Make sure the following tag is included on every templated page.

<script> window.schema_highlighter= { output: false, key: '<YOUR_API_KEY>' } </script>
<script src="https://cdn.schemaapp.com/javascript/highlight.js"></script>

*Replacing <YOUR_API_KEY> with your API key found here.


Pros:

  • Nearly up to date schema markup (Realtime - 1 page load)
  • Supported by Schema App CMS integrations
  • Supports AMP

Cons:

  • Requires backend integration (unless using Schema App CMS integration)
  • Can be out of date with live content (only as recent as the last page load)