Oct 20, 2021 6:50 AM
Recently I created job posting page with job descriptions from greenhouse
It generated single job description dynamically after choosing one on Careers Page of my webpage, example here - https://www.toriihq.com/jobs?gh_jid=4023354004
But I want to be able to share that job description on the social media with proper preview. Unfortunately what LinkedIn generates is this page's original meta title and description (set up in Hubspot CMS). I tried to change metadata dynamically using custom JS code which worked, but only for the website (LinkedIn fetched the original data, probably ignores JS loading).
Is there a way to generate metadata (title and description) from this greenhouse job description (job title and job description - approx first paragraph)? But it would have to be loaded with the DOM not JS dynamically after all.
Thanks for help!
Oct 21, 2021 1:46 PM
Oct 22, 2021 8:15 AM
Hi @WGwardjak, because you're using JS to populate the job data on the page via the id URL parameter this isn't possible. I believe LinkedIn uses the og: meta data to pull this information, and that has to be set server-side rather than client-side. JS can only affect client-side, unless you're using a framework like React or Vue.
The only workaround I can think of off the top of my head is to use a serverless function (if you have the required Hubspot subscription level) and push your Greenhouse data to a HubDB, then create dynamic pages using the HubDB, which is server-side.