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

SEO Info not updated with the API #1453

Open
fackerlee opened this issue Apr 16, 2024 · 1 comment
Open

SEO Info not updated with the API #1453

fackerlee opened this issue Apr 16, 2024 · 1 comment

Comments

@fackerlee
Copy link

Issue:
I've been working on enhancing the SEO capabilities of our product details pages. The goal is to dynamically populate meta tags with relevant information fetched from an API based on the product details being viewed.

Current Behavior:
To achieve this, I've implemented a solution where I retrieve the product ID from the URL, call our API to fetch the necessary data, and then attempt to update the meta tags with this retrieved information. However, I've encountered an issue where the initial load of the page results in null values being populated in the meta tags. Although subsequent API calls successfully fetch the data, the meta tags remain unchanged and continue to display null values.

Desired Outcome:
Ideally, I would like the meta tags to be updated dynamically with the data retrieved from the API. This would ensure that the meta tags accurately reflect the content of the product details page, consequently improving the SEO performance of our GitHub repositories.

Proposed Solution:
I believe that implementing a mechanism to update the meta tags upon successful retrieval of data from the API would address this issue effectively. This could involve triggering a function to update the meta tags within the callback of the API request, ensuring that they reflect the latest data fetched.

Request for Assistance:
I'm reaching out to seek guidance on how best to achieve this dynamic updating of meta tags within GitHub repositories. Any insights, recommendations, or examples of similar implementations would be greatly appreciated.

Thank you for your attention to this matter.

@garmeeh
Copy link
Owner

garmeeh commented Apr 25, 2024

Hey @fackerlee, it sounds you may be fetching the extra data to update the meta tags on the client side?

For SEO you should be requesting this server side for the first render of the page.

A useful way of testing what search engines see is to disable javascript and load the page. Or "View Page Source"

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

No branches or pull requests

2 participants