产品价格页面上的角度变量会在Google结构化工具上引发错误

问题描述 投票:0回答:1

我有用于渲染产品信息的cshtml页面。我在页面中使用了微数据。由于我使用角度变量来显示价格,谷歌结构化数据工具抛出异常。

{{productData.retailPrice}}不是有效的价格规范。

当我使用角度变量来显示价格时,谷歌结构化数据工具会抛出异常。

<span ng-cloak ng-if="productData.selectedItem.SingleUnitPrice > productData.customProductPrice.customPrice">                                                <span itemprop="priceCurrency" content="CAD">$</span><span itemprop="price" class="lineThruRegPrice">{{productData.selectedItem.SingleUnitPrice}}</span>

 <span itemprop="priceCurrency" content="CAD">$</span>
<span class="salePrice">{{productData.customProductPrice.customPrice}}</span>
 </span> <span ng-cloak ng if="productData.customProductPrice.customPrice==productData.selectedItem.RetailPrice">
<span itemprop="priceCurrency" content="CAD">$</span><span itemprop="price">{{productData.customProductPrice.customPrice}}</span>
                                            </span>

我希望谷歌机器人而不是变量读取角度变量值。评估角度变量的延迟是否会导致此问题?

angularjs asp.net-mvc microdata
1个回答
0
投票

结构化数据测试工具处理JavaScript的能力非常有限。我认为真正的价值是由JavaScript添加的,工具没有看到。

您现在可以在Google Search Console中的页面上测试产品标记。在相关页面上进行URL检查。它将显示Google看到的产品标记。

然后,您可以执行实时测试以查看最近的编辑如何影响事物。

此工具基于Googlebot并以相同方式呈现页面。

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.