Step 1: Add Schema.org markup to your Pages

Overview

First we are going to start with the primary component of Knowledge Tags, which is the ability to add Schema.org markup to your Pages using the <script> tag.

To start, you will need to add the Knowledge Tags <script> tag to your webpage. This is the only step you need to take to add schema.org markup to your page. All of the additional steps are optional to add additional content to the page.

When adding this script tag to your page, you want to add this <script> tag before the closing </head> tag on your page.

Access the Script Tag

To access the <script> tag:

  1. In Yext, click on Pages in the navigation bar, and then Knowledge Tags.
  2. Click on the Add Knowledge Tags to Website button. You’ll be brought through the flow to add your Knowledge Tags.

For full instructions on configuring Knowledge Tags to include custom schema.org markup or Conversion Tracking, visit the Add Knowledge Tags to your Website help article.

You can see an example script tag below:

 <script async defer src="https://knowledgetags.yextpages.net/embed?key=KamUQv_w3FGCPdUOneIuxCd5ZCujvj0Q0bZZlicqyXDy1RoypsxzzmTLfmT3JJQP&account_id=0123456&entity_id=815&locale=es" type="text/javascript"></script> 

The <script> tag includes the following parameters:

  • key: This is used to enable the Tags JavaScript implementation. This key is found in the Knowledge Tags section of the Yext platform.

  • entity_id: The ID of the relevant entity. This identifies the entity whose data to use for schema.org markup and content. If you wish to fetch data for multiple entities, you must include this parameter multiple times (e.g. entity_id=example1&entity_id=example2).

  • account_id: For direct customers, the Account ID can be found in the Account Settings section of the account.

    • If you are using the Partner Portal, the account_id is the ID found in the Yext Customer ID column in the Partner Portal, corresponding to a particular client.
  • locale: This optional parameter specifics which language profile to retrieve content from.

    • Note, this is only applicable if you’re using our Multi-Language Profile feature.

If your page includes multiple entities, you can create one <script> tag that includes multiple entities, by adding the additional entity IDs to the script in the following format:

 <script async defer src="https://knowledgetags.yextpages.net/embed?key=KamUQv_w3FGCPdUOneIuxCd5ZCujvj0Q0bZZlicqyXDy1RoypsxzzmTLfmT3JJQP&account_id=0123456&entity_id=4&entity_id=815&locale=es" type="text/javascript"></script> 

Note, when using a <script> tag that includes multiple entities, it will only take the first locale and apply it to all entities.

Configure the default Schema.org markup

The <script> tag will automatically add the relevant schema.org markup to your page for built-in entity types. However, for custom entities, you will need to configure schema markup because custom entities don’t have a set of predefined fields. For information on how to configure the schema.org markup for your entities, see the Customize Schema.org Markup Using Knowledge Tags help article.

Feedback