Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding organization structured data json #2623

Merged
merged 18 commits into from
Feb 18, 2025

Conversation

hellofanny
Copy link
Contributor

@hellofanny hellofanny commented Jan 23, 2025

What's the purpose of this pull request?

Adding organization structured data to your home page can help Google better understand your organization's administrative details and disambiguate your organization in search results.

How it works?

Allow adding the following Organization schema proprieties:

  • url: the URL of the website of your organization. This helps Google uniquely identify your organization.
  • sameAs: The URL of a page on another website with additional information about your organization, if applicable. For example, a URL to your organization's profile page on a social media or review site. You can provide multiple sameAs URLs.
  • logo: A logo url that is representative of your organization, if applicable. (image guidelines)
  • image: An image that is representative of your organization. This could also be the same as the logo. Add a ImageObject (provide image url and caption)
  • name: The name of your organization.
  • legalName: The registered, legal name of your Organization.
  • email: The email address to contact your business, if applicable.
  • telephone: A business phone number meant to be the primary contact method for customers, if applicable.
  • address: The address (physical or mailing) of your organization, if applicable.

Note: Users can add Organization data through the headless CMS interface.

Headless CMS

image

TODO: Run cms sync in default acc.

How to test it?

  1. Go to preview link, inspect and look for Organization
image
  1. Copy the generated script and paste here - google rich test to test the valid schema:
image

OR

  1. Test in storeframework account, go to CMS admin, changes the fields values -> Save and Publish.
  2. Wait for the new preview link and do the same process mention above (look for organization and validate the schema)

Starters Deploy Preview

vtex-sites/starter.store#655

References

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview Feb 1, 2025 0:14am

Copy link

codesandbox-ci bot commented Jan 23, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@hellofanny hellofanny changed the title chore: Testing organization json feat: Adding organization structure data json Jan 25, 2025
@hellofanny hellofanny changed the title feat: Adding organization structure data json feat: Adding organization structured data json Jan 25, 2025
@hellofanny hellofanny marked this pull request as ready for review January 27, 2025 13:32
@hellofanny hellofanny requested a review from a team as a code owner January 27, 2025 13:32
@hellofanny hellofanny requested review from lariciamota and pedromtec and removed request for a team January 27, 2025 13:32
@hellofanny hellofanny force-pushed the feat/test-strutured-data-seo branch 2 times, most recently from 2362370 to 53e05f1 Compare February 6, 2025 01:03
@hellofanny hellofanny self-assigned this Feb 6, 2025
"type": "string",
"default": "VTEX Commerce"
},
"id": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: what is this id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The id serves as a reference key, allowing us to use it elsewhere in our structured data. Our client has listed it as a required attribute, as they seem to rely on it frequently.

Maybe I should update this description 🙇

There is this link for reference.

@@ -6,6 +6,30 @@ module.exports = {
author: 'Store Framework',
name: 'FastStore',
publisherId: '',
organization: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I'm wondering, since it's already configurable in the hCMS, why add it also on the discovery.config? I understand there are already some SEO config on this file and on hCMS, but I started to wonder about it now because it's a lot of data and we are about to add more SEO data in upcoming PRs. So I'd like to hear what you thought about it, and if I'm missing something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice question! I just added it to follow the pattern, keeping it in both places and allowing customization via hCMS and code. However, I feel like we're adding more and more attributes. Maybe it would be better to create a separate file just for handling SEO configuration, or we could keep these "extra" settings in hCMS instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah!! Could you open a thread on our channel so everyone can discuss those approaches? 🙏

Copy link
Contributor Author

@hellofanny hellofanny Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've discussed as a team, and decided to keep particular page's SEO configurations only in the hCMS.

@hellofanny hellofanny force-pushed the feat/test-strutured-data-seo branch from 53e05f1 to fd2412e Compare February 10, 2025 16:21
@hellofanny hellofanny force-pushed the feat/test-strutured-data-seo branch from 6d44df4 to 1c0e35f Compare February 18, 2025 13:51
@hellofanny hellofanny merged commit c97f437 into main Feb 18, 2025
12 of 13 checks passed
@hellofanny hellofanny deleted the feat/test-strutured-data-seo branch February 18, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants