CMS Development

AYadav
メンバー

How to add schema to different landing pages in Hubspot

解決

How can I add schcema to different landing pages in hubspot, I have a document from my SEO Team with the schema to update in each page, but I'm not sure where to update it

0 いいね!
1件の承認済みベストアンサー
stephane
解決策
投稿者

How to add schema to different landing pages in Hubspot

解決

If your question is where to update the schema - for each of your pages, enter the editor mode, then go to the settings tab, then scroll down to "advanced options" and there you'll see an "Additional code snippets" section. Paste your schema in the "head html" editor you see there. Save & publish. See an example below for instance. CheersScreen Shot 2021-06-24 at 4.55.48 PM.png

元の投稿で解決策を見る

3件の返信
stephane
解決策
投稿者

How to add schema to different landing pages in Hubspot

解決

If your question is where to update the schema - for each of your pages, enter the editor mode, then go to the settings tab, then scroll down to "advanced options" and there you'll see an "Additional code snippets" section. Paste your schema in the "head html" editor you see there. Save & publish. See an example below for instance. CheersScreen Shot 2021-06-24 at 4.55.48 PM.png

albertsg
ガイド役

How to add schema to different landing pages in Hubspot

解決

Hello @AYadav, sorry I'm not an expert with schemas but as far as I know you need different JSON-LD codes for each page, right?

If that's the case, you can add different pieces of code to your template according to, for example, the URL or some property in a custom module, for example.

Let's say you have 3 different schemas for 3 different pages that are using the same template. In this case, what I would suggest is adding a custom module to your template so you can add the schema for each page.

Another solution could be using macros to detect the URL and return the correct schema.

 

I believe you have different solutions here, it's up to you to decide what works better for you.



Did my answer help you? Mark it as a solution

You also connect with me on LinkedIn or Twitter

piersg
キーアドバイザー

How to add schema to different landing pages in Hubspot

解決

@albertsg idea's are good, however, if you're not a developer or if you want a simpler way of doing this/editing the schema in the future for other people, you could simply add a default HTML module anywhere to your page and then copy the schema in between script tags e.g.

<script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Recipe",
      "name": "Party Coffee Cake",
      "author": {
        "@type": "Person",
        "name": "Mary Stone"
      },
      "datePublished": "2018-03-10",
      "description": "This coffee cake is awesome and perfect for parties.",
      "prepTime": "PT20M"
    }
</script>