Add schema

I am trying to embed schema to this widget using Custom JS. You said it can’t use , so I tried this and it didn’t work. Any suggestions of embedding schema in the widget (used to inject schema on web2.0.).

// Create a element
const schemaScript = document.createElement(‘script’);
schemaScript.type = ‘application/ld+json’;

// Define your Schema.org JSON-LD
schemaScript.textContent = JSON.stringify({
@context”: “https://schema.org”,
@type”: “Person”,
“name”: “John Doe”,
“jobTitle”: “Software Engineer”,
“telephone”: “(425) 123-4567”,
});

// Append it to the current location in the DOM
document.currentScript.parentNode.insertBefore(schemaScript, document.currentScript);

3 Likes

Hey there and welcome to the Community @Steven_Vasquez :wave:

Unfortunately, it’s impossible to add Schema markup to the widget, even using Custom JS. However, I’ve added this idea to the Wishlist and if it gets more votes, we’ll try to consider this opportunity :slightly_smiling_face: