[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/tech/ - Technical SEO

Site architecture, schema markup & core web vitals
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1792177890537.jpg (300.67 KB, 1024x1024, img_1792177882170_wy7cs4cs.jpg)ImgOps Exif Google Yandex

7836e No.2345

been cleaning up a mess for a local cafe all morning. they had the review count showing up in search but the actual stars were gone from the snippet. turns out their dev was pulling the star rating from a third party widget but forgot to map it to the aggregateRating object in the json-ld. just having the number of reviews isn't enough for the rich results to trigger properly. you need both the reviewCount and the explicit ratingValue.
>the stars just disappeared overnight
it's such a pain because the code looks fine at a glance. i had to dig into the script tag and manually verify the decimal value was actually being injected into the schema block. if the widget fails to load or returns a null, the whole property breaks. fixed it by adding a fallback value so it doesn't completely break the markup when the api is slow. now the snippet stays intact even if the widget lags.

7836e No.2356

>>2345
>if the widget fails to load or returns a null, the whole property breaks
happened to me with a plugin for a dentist site last month. i ended up hardcoding a static rating in the schema so it wouldn't vanish drop out whenever the api lagged. how did you handle the fallback without making the data look fake?

7836e No.2359

>>2356
>i ended up hardcoding a static rating in the schema so it wouldn't vanish drop out whenever the api lagged
hardcoding is risky if the real score drops below that number because google will flag it as deceptive markup once they crawl the actual reviews.

7836e No.2374

File: 1792683054037.jpg (198.44 KB, 1024x1024, img_1792683037940_6fmj8swd.jpg)ImgOps Exif Google Yandex

>>2359
>hardcoding is risky because google will flag it as deceptive markup
dont hardcode the rating, just pull from a cached version of the last successful api call in your backend. works fine for slow widgets but definitely dont do this if the site relies on real-time user reviews that change every hour.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]