Inserting the dynamic meta title and meta description fails

Definitely just another stupid mistake.

On both sides and the queries everything is the same “as far as I can see”.
Only the path and route is different:
https://relaunche.cg-events.de/betriebsausflug
Route: Link/:cat
Everything is going well here

https://relaunche.cg-events.de/betriebsausflug/haltern-am-see
Route: Link/:kat/:city
Why isn’t the title and description shown here?

To render dynamic data in your head tags, you need to set the App Root to Page:

Screenshot 2024-01-16 at 11.08.54

1 Like

Like I said, just another stupid mistake. :man_facepalming:
Thank you Teodor!

I still have one question.
When I go to the Inspect page, the title and description are there.
When I display the source text, only the variables are displayed but not the content.

Does it have to be like that?

Yes, the dynamic expressions are rendered on the client side, so when inspecting the source they are supposed to be like that. Search engines render your dynamic perfectly fine, so there’s nothing to worry about.

1 Like

Unfortunately, it looks like the meta description cannot be read by Google.
What am I doing wrong?

I had to load the meta description via “Innert Text” because it doesn’t work via Server Side Data / Meta Tags.

Why don’t I see Server Connect as an option here?

This (inner text) is not correct as it will produce code like this:

<meta name="description"> 
Content goes here
</meta>

which is actually quite wrong, as you can see on your screenshot

The correct syntax for this meta tag is:

<meta name="description" content="Content goes here">

which means that in your case you need to make the content part dynamic and this happens as usual by adding dmx-bind: in front of it:

<meta name="description" dmx-bind:content="getPage.data.queryGetPage.metaDescription">

Not sure what you mean by this screenshot:

but if you want to use server-side rendering for meta tags in a NodeJS project, then follow this tutorial:

Thank you very much Teodor, that works… :+1:
I still have to learn a lot. :tired_face:

With server side rendering, it is not clear to me where the query gets the input parameters from routing.

Unfortunately this doesn’t work on every page.
what am I doing wrong here?

For the title you don’t use content=""
I think you shold get familiar with how the meta tags are used before trying to add dynamic values to them.

So title is used like:

<title>{{dyniac_data}}</title>

description meta tag:

<meta name="description" dmx-bind:content="dynamic_data">

Also as explained in the same topic you posted a while ago, you need to set the app root option to page, not to body: