JSON-LD是一种基于JSON的格式,用于序列化关联数据。该语法旨在轻松集成到已使用JSON的已部署系统中,并提供从JSON到JSON-LD的平滑升级路径。它主要用于在基于Web的编程环境中使用关联数据,构建可互操作的Web服务以及在基于JSON的存储引擎中存储关联数据。
如何将 JSON-LD 面包屑模式添加到我的网站导航中以实现 SEO 目的
编辑:当我写问题时,我对这个问题的理解有所提高,但我仍然没有清除所有内容,这就是为什么我仍然问: 今天我被介绍给面包屑,我......
Google 识别的 JSON LD 格式的 Schema.org,但 Facebook Pixel Helper 无法检测到它
我使用添加了JSON LD格式的schema.org标签,当我使用Google结构化数据测试工具测试我的页面时,我可以看到我的所有标签。 但是,当我安装 Facebook Pixel Helper 时 </desc> <question vote="15"> <p>我使用<pre><code>JSON LD</code></pre>以<pre><code><script></code></pre>格式添加了schema.org标签,当我使用<a href="https://search.google.com/structured-data/testing-tool/u/0/" rel="noreferrer">Google结构化数据测试工具</a>测试我的页面时,我可以看到我的所有标签。</p> <p>但是,当我安装 <a href="https://chrome.google.com/webstore/detail/facebook-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc?hl=en" rel="noreferrer">Facebook Pixel helper chrome 扩展</a> 来测试我的页面时,schema.org 标签显示为空白。不知道为什么 Facebook Pixel Helper 无法检测到它。</p> <p>非常感谢任何帮助。</p> </question> <answer tick="false" vote="9"> <p>我发现Facebook Pixel对结构化数据的解析更加严格。字段中的空白换行将导致它发出警告。当我在地址中进行换行时,我就发生了这种情况。谷歌正确解释了该地址,但 Facebook Pixel 在控制台中发出了警告。</p> <p>添加以下代码解决了我的情况:</p> <pre><code>$address = preg_replace( "/\r|\n/", " ", $address ); </code></pre> <p>当然,正如这里指出的那样<a href="https://stackoverflow.com/questions/2392766/multiline-strings-in-json">JSON不支持真正的换行符</a>。</p> </answer> <answer tick="false" vote="3"> <p>聚会迟到了,但对于来这里的人来说仍然如此。 FB Pixel 现在支持 JSON-LD:<a href="https://www.facebook.com/business/help/1175004275966513" rel="nofollow noreferrer">https://www.facebook.com/business/help/1175004275966513</a></p> </answer> <answer tick="false" vote="3"> <p>对我来说,多个空格都有错误(据我所知)。 <br/>因此,我使用这段代码:</p> <pre><code>$description = preg_replace("#\r|\n|(\s+)#iu", " ", $description); </code></pre> </answer> <answer tick="false" vote="0"> <p>JSON 扩展还为所有其他网页添加了 JSON-LD 格式的架构标记,这是 Google 喜欢的。 “Facebook Pixel”不读取架构元标签或 JSON-LD(Pinterest 读取架构元标签,但不读取 JSON-LD)。</p> <p>听起来您可能有点困惑 – Facebook 不读取架构标记 – Facebook 读取开放图元标签。您可以在这里找到该标准的详细信息:<a href="http://ogp.me/" rel="nofollow noreferrer">http://ogp.me/</a>。</p> <p>仅供参考 <a href="https://www.withintheflow.com/facebook-pixel-helper/" rel="nofollow noreferrer">https://www.withintheflow.com/facebook-pixel-helper/</a></p> </answer> <answer tick="false" vote="0"> <p>您可能碰巧在 init 调用中有 <pre><code>fbq('set', 'autoConfig', 'false')</code></pre>。 </p> <p>Facebook Pixel 会将元数据发送到您的 Pixel 设置,但在初始化代码中,如果您将 <pre><code>autoConfig</code></pre> 设置为 <pre><code>false</code></pre>,Facebook Pixel 将不会发送此附加信息。</p> </answer> <answer tick="false" vote="0"> <p>我还使用 Json-LD 脚本标签。就我而言,实际上是在标签开始发送此数据之前移动 Facebook 像素脚本!</p> </answer> </body></html>
如何解析vue3中“知识图谱搜索API”返回的JSON-LD
看来我太笨了或者只是盲目,因为我无法做到这一点。 我的另一个 Google API(Books API)非常有用。 使用 JSON 样式的返回数据很容易。 但是这个“知识图谱”
我对结构化数据以及 schema.org 和 json-ld 很陌生,过去几天一直在查看示例和文档。 我遇到了 @graph 数组,它让我很困惑。 雅高...
我对结构化数据以及 schema.org 和 json-ld 很陌生,我已经检查示例和文档几天了。 但我最近遇到了 @graph 数组,它让我感到困惑......
我可以使用 json ld 模式作为 React 的站点地图吗
在反应中,我可以使用头盔创建带有链接的 json ld 模式,这实际上对 seo 目的有好处吗?有没有一种不同的方法可以在后端使用 json ld 与 mongo db 和express 来实现此目的。谢谢。
我正在尝试为事件列表创建结构化数据。我目前有以下内容: "@context": "http://schema.org", "@type": "项目列表", “……
使用什么 JSON LD 语法在 Google Inbox/Gmail 中显示带有电子邮件的公司图标
使用 json ld 标记电子邮件时,必须使用什么 JSON LD 架构才能在 Google Inbox/Gmail 中显示带有电子邮件的公司图标。 我尝试按如下方式设置多个道具,但 Google d...
我想知道是否有一个包含多个“priceCurrency”和“price”的产品页面的工作示例。如果我们有两个地区和价格以及一个域名是可能的...
因此,让我们考虑从数据库获取的以下数据: [ { "@id": "http://example.com/1", "http://example.com/label": "父级", “http://exa...
我使用 GTM 来标记架构变量。 { "@context": "http://schema.org", "@type": "产品", ...</desc> <question vote="1"> <p>我使用 GTM 来标记架构变量。</p> <pre><code><script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Product", "name": "{{Product-name}}", "description": "{{Product-description}}", "category": "{{Product-category}}", "image": "{{Product-image}}", "sku": "{{Product-reference}}", "offers": { "@type": "Offer", "url": "{{Page Path}}", "Price": "{{Product-price-with-dot}}", "priceCurrency": "[EUR]", "itemCondition": "https://schema.org/NewCondition", "availability": "{{Product-stock}}", "seller": { "@type": "Corporation", "name": "Company Name" } } } </script> </code></pre> <p>除了某些产品的描述包含特殊字符的变量值“描述”之外,一切似乎都正常。 原始文本被转换为越来越多的特殊字符......并返回“Bad escape sequence in string”。</p> <p><a href="https://i.stack.imgur.com/W0mBm.jpg" target="_blank"><img src="https://cdn.imgupio.com/i/AWkuc3RhY2suaW1ndXIuY29tL1cwbUJtLmpwZw==" alt="Product-description variable set up"/></a></p> <p>原文描述:</p> <pre><code>id="pPdtDesc">Shopping bag. </code></pre> <p><a href="https://i.stack.imgur.com/b1ENq.png" target="_blank"><img src="https://cdn.imgupio.com/i/AWkuc3RhY2suaW1ndXIuY29tL2IxRU5xLnBuZw==" alt="Product description with " bad="" escape="" sequence="" in="" string"="" result"=""/></a></p> <p>如何解决所有可能出现的特殊字符问题?</p> </question> <answer tick="true" vote="0"> <p>答案是:</p> <p></p><div data-babel="false" data-lang="js" data-hide="false" data-console="true"> <div> <pre><code>function(){ var string = {{Product-description}}; return string.replace(/[^a-zA-Z0-9]/g, ''); }</code></pre> </div> </div> <p></p> </answer> <answer tick="false" vote="0"> <pre><code> "@type": "Question", "name": "What is Cooper Kupp\'s major?", "acceptedAnswer": { "@type": "Answer", "text": "Cooper graduated from Eastern Washington University, majoring in Economics." </code></pre> </answer> </body></html>
当我尝试通过组件 is='script' type='application/ld+json' 传递它时,出现错误: “类型错误:无法将符号值转换为字符串”,但是当我通过传送传递它时,它可以工作,但是......
我正在为我的一个朋友建造一个组合住宅。他是一位艺术家,他的主页应该包含很多交互元素,所以我决定使用 React 来构建它。然而,这意味着......
我正在尝试编写一个 SPARQL 查询,该查询将使用 Construct 从三元组存储中提取所有相关的三元组。本质上,三重存储包含一堆已解析的 JSON-LD 文档
JSON-LD SiteNavigationElement:子页面架构无法识别 itemListElement 属性
我有一个问题,我正在尝试使用“SiteNavigationElement”类型方案为我的网页制作 JSON-LD 代码。 然而当我尝试验证它时。它被拒绝并收到 5 次警告。 那个...
使用此简单代码创建一个 HTML 文件并在 Safari 中打开它。 [ { “@context”:&</desc> <question vote="2"> <p>使用此简单代码创建一个 HTML 文件并在 Safari 中打开它。</p> <pre><code><html> <head> <script type="application/ld+json"> [ { "@context": "http://schema.org", "@type": "Organization", "name": "Parqet", "url": "https://www.parqet.com/", "logo": "https://www.parqet.com/logos/parqet_logo_pos.svg", "sameAs": [ "https://www.facebook.com/parqetcom", "https://twitter.com/ParqetApp", "https://www.instagram.com/ParqetApp/", "https://www.youtube.com/channel/UC4LOcElG8Z73Hvgbbp3m1KQ", "https://www.linkedin.com/company/parqet/", "https://github.com/tresorone" ] } ] </script> </head> <body> test </body> </html> </code></pre> <p>Safari 会产生此错误。</p> <blockquote> <p>TypeError:未定义不是对象(评估 'r["@context"].toLowerCase')</p> </blockquote> <p><a href="https://i.stack.imgur.com/vDwOZ.png" target="_blank"><img src="https://cdn.imgupio.com/i/AWkuc3RhY2suaW1ndXIuY29tL3ZEd09aLnBuZw==" alt=""/></a></p> <p>非常感谢您对我们如何解决这个问题的任何见解。 在最后一个属性或对象中添加尾随逗号可以消除错误 - 但它不再是有效的 JSON。超级奇怪的行为🤔.</p> </question> <answer tick="false" vote="0"> <p>Safari 似乎对数组有问题,需要一个对象。 为了仍然编写多个 JSON-LD 定义,我们可以使用 <pre><code>@graph</code></pre> 表示法。</p> <p>这修复了错误。</p> <pre><code><html> <head> <script type="application/ld+json"> { "@context": "http://schema.org", "@graph": [ { "@type": "Organization", "name": "Parqet", "url": "https://www.parqet.com/", "logo": "https://www.parqet.com/logos/parqet_logo_pos.svg" } ] } </script> </head> <body> test </body> </html> </code></pre> <p>需要明确的是:对象数组是完全有效的。 我怀疑这是 Safari 中的一个错误。</p> </answer> </body></html>
我有一个出售电影院门票的网页,我添加了 Json LD 元数据来发布事件。 Google 搜索控制台正确显示事件,我在搜索我的电影时可以看到该片段
JSON-LD Playground(示例 JSON-LD 处理器)似乎不想使用“compact iri”(“example:dog”)来扩展内容(属性值),如下所示: { “@上下文&...
问题 JSON-LD 的提供者是否有必要确保节点的@id 始终是全局唯一的,或者只需要@id 在 JSON-LD 文档中是唯一的? 例子 让...
我已经尝试过这里提到的解决方案 我已经无数次检查过尾随逗号、空格、不规则的大括号。但他们都没有工作。有人可以帮忙解决问题