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

Add required properties to ld+json for Course info for Google Search Structured data #511

Open
pmerkland opened this issue Dec 20, 2023 · 6 comments · Fixed by #512
Open
Assignees
Labels

Comments

@pmerkland
Copy link
Collaborator

https://developers.google.com/search/docs/appearance/structured-data/course-info

According to Google Search Console and the google dev specifications we need to add the following required properties:

"Offers" which is basically a list of price names from the Course Template and/or Events in EduAdmin. I do not know the best way to filter this list. Maybe we already have a function for retrieving the correct prices for a course/event?

"hasCourseInstance" is also required. Use with "courseSchedule" if for every instance with an actual scheduled Event in EduAdmin and with "courseWorkload" if there are no Events scheduled.
Even though there is a feature to provide a instructor I think we should skip it as most users do not want to show the names of their instructors on their web.

@pmerkland pmerkland added the bug label Dec 20, 2023
@pmerkland
Copy link
Collaborator Author

Also hasCourseInstance.courseMode is a bit tricky. We should at least do "OnDemand": true, from EduAdmin Event API as "Online".
We could also check if the Event has any ActivityModules as "Blended". Otherwise just "Onsite".

Both "Blended" and "Onsite" needs a hasCourseInstance.location

@pmerkland
Copy link
Collaborator Author

From Google Search Console:
image

@itssimple itssimple self-assigned this Dec 21, 2023
@itssimple
Copy link
Member

The problem with "Offers" is that it is for the entire course, not the instances, from what I can see. So we can probably only offer the public pricenames on the course itself.

And about the hasCourseInstance, if there are no events coming/planned that comes from the API, it won't show up, as the course doesn't have any events. Question is if we should skip the ld+json for those cases.

But it also seems that Google have updated what they require, because I used this tool when I validated that the data was valid before: https://search.google.com/test

So either Google increased their requirements, or something else is wrong, because https://validator.schema.org/ still validates my test page without warnings or errors.

@itssimple
Copy link
Member

itssimple commented Dec 21, 2023

I'm not even sure how to set a date/schedule/workload for on demand courses, as we don't have any real dates or "time to complete" info in the API, as I know of, except OnDemandAccessDays, but what should we do, if that is missing?

@pmerkland
Copy link
Collaborator Author

We might have missed some more,
image
image

I guess we do "daily" and try to count the number of days from the Events EventDates if there are any, otherwise calculate based on the Events Start and end dates.

@pmerkland pmerkland reopened this Dec 22, 2023
@pmerkland
Copy link
Collaborator Author

Also CourseInstance.courseMode is a bit tricky. We should at least do "OnDemand": true, from EduAdmin Event API as "Online". We could also check if the Event has any ActivityModules as "Blended". Otherwise just "Onsite".

Both "Blended" and "Onsite" needs a hasCourseInstance.location

Also every CourseInstance needs an courseMode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants