SEO, AdWords, affiliates, advertising, and promotions
Hello everyone, I would like to make my Json-LD
code automatic.
That is to say that instead of rewriting it for all the products 1 by 1, I would like them to do the job for all of them.
The code is for structured data from google/Rich Snippets.
Here is the code I'm using for now:
{% if product.handle contains "The product name after the section: product/Product name" %}
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "Name of the product",
"image": [
"Image1",
"Image2"
],
"description": "The Product Description",
"brand": "The Brand",
"sku": "The Sku",
"gtin13": "None",
"offers": {
"@type": "Offer",
"url": "The Url",
"priceCurrency": "CAD",
"price": "The Price",
"priceValidUntil": "2030-12-30",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "5",
"bestRating": "5",
"worstRating": "1",
"ratingCount": "1",
"reviewCount": "1"
},
"review": {
"@type": "Review",
"name": "The Title",
"reviewBody": "The Description",
"reviewRating": {
"@type": "Rating",
"ratingValue": "5",
"bestRating": "5",
"worstRating": "1"
},
"datePublished": "2021-07-01",
"author": {"@type": "Person", "name": "Person Name"}
}
}
</script>
I would like to put a single code that would say what to do, a template/mode of use in fact.
I know it's not very clear unfortunately.
Thank you for your help!
Up!
Thank you!
Hi @Derek09 ,
If you want to add JSON-LD to all of your pages automatically, you can give a try to our SEO Booster app. With just one click, we will help you add JSON-LD code (also with all the schema code you need like price, reviews, etc.).
Please refer to our app in Shopify App Store for more details: https://apps.shopify.com/seo-booster
If you have any further queries, please feel free to contact us anytime. Have a good day!
Hi, try using the code below instead of your code to automatically add schema markup to all of your product pages.
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": “{{ product.title }}”,
"image": “{{ shop.url }}{{ product.featured_image }}”,
"description": “{{ page_description }}”,
"brand": "Your Brand",
"sku": "The Sku",
"gtin13": "None",
"offers": {
"@type": "Offer",
"url": "The Url",
"priceCurrency": “{{ shop.currency }}”,
"price": “{{ product.price | money_without_currency }}”,
"priceValidUntil": "2030-12-30",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "5",
"bestRating": "5",
"worstRating": "1",
"ratingCount": "1",
"reviewCount": "1"
},
}
</script>
I recommend adding a new snippet, name it something like "product-schema.liquid" to store the code above and paste {% include 'product-schema' %} to your product-template.liquid so that you can find it (and customize it) more easily later.
Shopify Schema Markup for Reviews Widget can be quite challenging (because it depends on the review apps that you're using), I recommend you leave it to the experts.
Luckily, we are currently offering free SEO projects. Kindly check this link for more information about the free project (which also include adding schema markup to your store). There are limited slots so you might want to sign-up fast.
Hope you find my comment useful, have a nice day!
thanks , i have already tried this type of schema , but i need it dynamic, and want to add reviews as well,
all seo apps are very limited , and do not provide this type of reviews , one way to solve it is to hire expert.
as i see.
Hey @TopBit
Most updated themes have basic structured data that is dynamic already though often are missing optional fields that Google wants to see. Reviews data should be provided by your review provider.
You can code this yourself, but then have to maintain the code going forward. That's why an app is often the better route as we keep up with Google's changes.
JSON-LD for SEO is a single, one-time charge and completely devoted to providing the proper schema for your site. Because it’s meant to replace the work needed by an experienced web developer, charging you a one-time fee makes the most sense. That way you pay it once, just like if you hired someone for several hours to do the same.
JSON-LD for SEO integrates with over 20 review providers so depending on who you use, we may be able to help.
Feel free to contact me at support@ilanadavis.com or provide your URL here and I can let you know if the app would be helpful.
Hello @Derek09
We can surely make it dynamic, it will automatically render data according to specific product.
Here is the example that how we did it for other merchants.
Skype : preetlove92
You can use a SEO app (like mine) to generate the JSON LD snippet for you.
If you want to the no-app way, you'll need to change the product liquid file.
1. Find out the product detail page liquid file of your theme.
2. Add your JSON LD code snippet into the <head> tag
3. Replace the content value with the liquid code, e.g {{ product.title }} to replace product name
4. Add the liquid filter if necessary, e.g. you may want to strip the product description to remove html
I already have the code, the problem is that I have to write the code for each of my products and update it etc....
I would love to have a code that automates this.
did u find the solution?
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024