【发布时间】:2018-01-16 15:35:10
【问题描述】:
我已经实施了一些 Trustpilot Trustboxes,以便在我的网站上获取用于 SEO 的 Rich Snippets。 This 指南已被使用。问题是 Google-bot 和 Google structured-data testing-tool 无法识别应包含在标头中的标记。
我的测试:
- 我在网站上创建了一个“空白”页面,只加载 必要的 Trustpilot 东西。测试工具无法识别标记,也没有检测到结构化数据。
- 我通过Structured Data Testing Tool 上的自定义代码测试了标记,方法是直接在标题中添加获取的标记。测试工具检测到结构化数据。
- 浏览网站时,在检查网站时可以在 html-header 中看到标记,例如Chrome、Firefox 等(Google bot 或结构化数据测试工具无法看到它)。
我对测试的结论: 该问题不是由加载速度慢或标记错误引起的。目前我最好的猜测是,用于网站的框架或配置中的某些内容会阻止谷歌识别/获取来自 Trustpilot 的标记。当然,这只是我的结论。我可能完全错了。
Heroku 和 Play 框架用于托管/作为网站的框架。难道是我错过了在 Play 或 Heroku 中启用某些允许谷歌识别/获取 Trustpilot 标记的选项?是否应该在内容安全策略中添加一些内容(与 schema.org 相关的内容)?
注意:我可能在这个问题中错误地使用了术语。
[更新]
Trustbox 用于lendino.dk 和this test app。
下面的代码用于测试应用:
<!DOCTYPE html>
<head>
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js"></script>
</head>
<body>
<div>
<div class="trustpilot-widget"
data-locale="en-US"
data-template-id="54ad5defc6454f065c28af8b"
data-businessunit-id="54e497ed0000ff00057d80c7"
data-style-height="220px"
data-style-width="100%"
data-theme="light"
data-tags="SelectedReview"
data-schema-type="Organization">
<a href="https://en.trustpilot.com/review/www.lendino.dk" target="_blank">Trustpilot</a>
</div>
</div>
</body>
【问题讨论】:
-
您有机会分享您提到的测试吗?也许是链接或代码示例?
-
@MartinBuberl 根据要求,我已经为 Trustbox 添加了主网站、测试应用程序和代码 sn-p。如果您检查链接,您会看到“”被添加到两者上,其中包含一些 trustpilot 脚本。因此,浏览器/用户可以看到这些。问题是 Googlebot 和 Google 结构化数据工具看不到这些。
标签: heroku playframework googlebot google-rich-snippets trustpilot