Adobe Experience Manager (AEM) is a comprehensive content management solution for building websites, mobile apps and forms.
The Schema App Connector for AEM was created to serve a growing subset of our clients who host their websites on AEM. The connector allows our clients to get JSON-LD server side which increases schema markup deliverability as well as reduces client page rendering time. With this method, clients are able to deploy up-to-date schema markup to their websites at scale.
TABLE OF CONTENTS
- Technical Design
- Permissions & Services
- Security Features
- Installation Guides
- Additional Resources
The Schema App connector for AEM locally caches your Schema Markup so it can be deployed with the rest of your content when the page is rendered. This provides greater assurance your schema markup will load in time for Search engines.
The first step in the process is integrating with AEM using one of the following methods:
- Crawler + AEM
[Fig. 1] Initial Setup Flow
After plugin installation, the AEM Author logs into AEM and creates a new configuration and adds the details that they have copied from Schema App.
Submit the details to Schema App to Register the AEM URL.
Schema App will return a Success response if the Account details and URL are correct.
The AEM Author will add the newly created configuration to the respective sites in which they want to enable the plugin.
Publish the AEM page, where we have configured the plugin.
The Schema App AEM Connector is now ready to receive Schema Markup webhooks.
Once the registration is all set up, the process of inserting and updating JSON-LD can proceed.
[Fig. 2] JSON-LD Injection Flow
AEM Scheduler runs on a predetermined schedule to make calls to the Schema App API data for each page. This scheduler runs on both the Author and Publisher instance so any data updates on the Author are replicated with the markup.
Once a response is received from the DATA API call, if it's not blank we will find that page in AEM, and create a 'schemaapp' node under the page node and set the JSON-LD. If a node already exists then the JSON-LD is stored and updated.
After updating JSON-LD in the page node, we will make a call to the AEM dispatcher to clear the cache for that particular page. This request is sent from the Publisher instance as shown above.
Once a user visits the website URL (e.g. page1), a request first comes to the Dispatcher as we have already cleared the cache for page1, and redirects to the Publisher. In the Publisher, there is a JSP script (headlibs.jsp) that will conditionally insert the JSON-LD Schema Markup into the head tag of the page if the Schema App node exists under the page node. This leverages the apache sling framework that AEM is based on. This JSP is invoked only after setting up the Schema App configuration in Author instance upon plugin installation. Additionally, this injection only occurs for non-headless installations.
NOTE: When a new page is published from the Author, JSON-LD is not removed. This is because the Scheduler runs on both Publisher and Author and therefore the JCR, when replicated to the Publisher, will include the markup.
For decoupled AEM, when a user requests a page, the request will be served by the front end (React JS or Angular JS), AEM frontend will call the page.model.json API and fetch the page content as JSON.
When the response is received from the API, scripts are created and added to the HTML header section. Subsequent API calls to the JSON API generate and insert required Schema Markup on the page.
In general, it will not be necessary to invalidate the dispatcher cache. Schema App does send a request when the markup is updated.
Permissions & Services
The below table highlights the permissions and services that will be required for the plugin to work efficiently.
|To create schemaapp JSON-LD data node under page content node.|
|To create and read schemaapp config|
Receives requests from the dispatcher.
Makes calls to the Schema App CDN.
User Permissions: Content-author access is required to create new Cloud configurations. No other special access is required.
Source of JSON-LD is validated by Schema App connector to make sure that malicious scripts or JSON-LD can not be injected into a website.
Validation of metadata and content of JSON-LD
- Crawler + AEM
Was this article helpful?
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
We appreciate your effort and will try to fix the article