As a fallback we always set up required meta tags out of the box from our JS SDK, it works for Google as far as we know.
You would still need to implement them server-side on your part in those cases:
- You want to make SEO work for other search engines.
- Have a guarantee it always works as expected with Google.
- You want an OpenGraph support (rich previews when sharing links).
For this purpose we provide an API endpoint with all required data in JSON format so you can render it as fit for your setup. You can see docs at https://api.peerboard.com/docs/#get-/ssr. You'll get a response similar to this
{
lang: "en",
canonicalURL: "https://example.com/post/12345",
title: "SSR test",
metaTags: [
{
attrName: "property",
attrValue: "article:published_time",
content: "2021-11-11"
}
]
}
You would need to render tag data using this pseudo-code:
<html lang="{{lang}}">
<head>
<link rel="canonical" href="{{canonicalURL}}">
<title>{{title}}</title>
// For each tag in metaTags:
<meta {{attrName}}="{{attrValue}}" content="{{content}}>
If you do it you would also need to add skipJsMeta=true
to SDK init options to disable our js-level fallback and avoid page content override on our end.