SEO инстурменти
- Agregate rating
.container {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
}.column {
flex: 1;
padding: 10px;
}textarea {
width: 100%;
height: 390px;
}.column button {
background-color: transparent;
background-image: linear-gradient(290deg, #597CFF 0%, #6666C3 100%);
font-size: 16px;
padding: 15px 30px;
border-radius: 4px;
color: white;
border: none;
cursor: pointer;
margin-top: 10px;
}.column button:hover {
background-image: linear-gradient(290deg, #6666C3 0%, #597CFF 100%);
}
function generateJsonLD() {
const itemName = document.getElementById(‘itemName’).value;
const averageRating = document.getElementById(‘averageRating’).value;
const ratingCount = document.getElementById(‘ratingCount’).value;
const reviewCount = document.getElementById(‘reviewCount’).value;
const noOfReviews = document.getElementById(‘noOfReviews’).value;const jsonLD = {
„@context“: „http://schema.org“,
„@type“: „Product“,
„name“: itemName || „Item“,
„aggregateRating“: {
„@type“: „AggregateRating“,
„ratingValue“: averageRating || „0“,
„ratingCount“: ratingCount || „0“,
„reviewCount“: reviewCount || „0“
}
};document.getElementById(‘generatedJsonLD’).value = JSON.stringify(jsonLD, null, 4);
}function copyToClipboard() {
const textarea = document.getElementById(‘generatedJsonLD’);
textarea.select();
document.execCommand(‘copy’);
alert(‘JSON-LD copied to clipboard’);
}function goToRichResultsTest() {
window.open(‘https://search.google.com/test/rich-results’, ‘_blank’);
}
function generateJsonLD() {
const itemName = document.getElementById(‘itemName’).value;
const averageRating = document.getElementById(‘averageRating’).value;
const ratingCount = document.getElementById(‘ratingCount’).value;
const reviewCount = document.getElementById(‘reviewCount’).value;
const noOfReviews = document.getElementById(‘noOfReviews’).value;if (!itemName || !averageRating || !ratingCount || !reviewCount || !noOfReviews) {
alert(‘Попълни всички полета!.’);
return;
}const jsonLD = {
„@context“: „http://schema.org“,
„@type“: „Product“,
„name“: itemName,
„aggregateRating“: {
„@type“: „AggregateRating“,
„ratingValue“: averageRating,
„ratingCount“: ratingCount,
„reviewCount“: reviewCount
}
};document.getElementById(‘generatedJsonLD’).value = JSON.stringify(jsonLD, null, 4);
}
JSON-LD Aggregare rating Markup Генератор
Генериран JSON-LD Markup:
Оценка
