Global Schemas Basics

Adding Global schema 

You can now tag a schema as global and it can be used in the future across all URLs of the website.  

Let’s start with adding a global schema to a URL that has contact information. Click on ‘Edit Schema’ on the page that has the ‘Contact Page’ schema.  

 

Add the ‘Postal Address’ schema and enter the properties such as Description, Locality, Region, etc. Click on ‘Set as Global’ once all the required fields have been entered.

 

Now to set the schema as global, you will have to first add @id (a unique identifier for schemas) and the name. If not, you will see a message like this.  

 

To do so, click on ‘Add property’, choose @id and enter the URL along with #postal address as shown in the image.  

 

Note: Please ensure that @id property value is unique and has not been used in any other schema. 

Next, click again on ‘Add Property’ and choose ‘Name’. Enter the name of the schema property as ‘Milestone Postal Address’. 

 

Once you’ve added the two fields (@id and name) click on ‘Set as Global’.  

 

You will immediately see the global icon and a notification requiring you to save to use the schema globally anywhere. Click on ‘Save’ to declare the Global Schema. 

 

 

Now back on the ‘Tag Schema’ page you will see that a Global schema appears against the URL for you to easily identify that it has one or more global schemas defined. 

 

 

Reuse Global Schema 

Now let’s show you how you can reuse a global schema. Click on ‘Edit’ on a URL where you want to refer to the global schema that you just created. 

 

Choose the Schema type for the page (i.e. organization) and click on Contact Point property and select @id type. When you click on @id , list of all available global schemas is displayed. Select the Postal Address global schema (‘Milestone Postal Address’) that you just created in previous step as a reference. 

 

 

Now enter other necessary properties for Organization schema and click on ‘Save and Generate’.  You can observe that the Generated Schema preview that the referred global schema ‘Milestone Postal address also appears along with other tagged schemas. 

 
 

This referred global schema also appears under schema column and is visible upon save/publish of the concerned URL. 
 


Using filters to find pages with global schema

Once you have published global schemas, you can use the ‘Filter’ option on the ‘Tag Schema’ page to filter pages that are ‘Declaring Global Schemas’ and those that are ‘Containing Global Schemas’.  

Choosing ‘Declaring Global Schemas’ will display pages that have one or more saved/published global schemas whereas pages that have referred one or more global schemas (and saved/published) will be displayed if you choose to click on ‘Containing Global Schemas’.  

 

 

You can remove a schema as global by simply clicking on ‘Remove as Global’. 
 
 

You will be asked to save so that the schema is no longer available as global. 

 

Note: If you have referenced a global schema in one or more URLs, you will need to remove those references before you can remove a schema as global. 
 
 

 

Clicking on ‘Show me the referencing URLs’ will take you the list of URLs referring the schema that you want to remove in a separate tab. 
 
 
To remove a referred Global schema, simply click on Remove Referred Schema as shown below and save/publish.