Sternebewertungen für Discourse-Seiten in Suchmaschinenergebnissen (SERPs) anzeigen

Die Anzeige von Sternenbewertungen mit Discourse ist einfach. Ich freue mich, mitteilen zu können, dass dies in wenigen einfachen Schritten erledigt werden kann.

Vorgehensweise

  1. Richten Sie Google Tag Manager für Ihre Discourse-Anwendung ein

  2. Fügen Sie ein neues HTML-Tag mit JSON-LD-Markup hinzu

  3. Filtern Sie den Trigger nach Seitenaufruf für eine bestimmte URL

  4. Veröffentlichen Sie die Änderungen und warten Sie 24 Stunden, um das Ergebnis in den Suchmaschinenergebnissen (SERPs) zu sehen.

Vielen Dank

8 „Gefällt mir“

Interesting. Where are you getting the rating from, Google?

1 „Gefällt mir“

Yes, it is Google SERPs. :blush:

Looks interesting and useful for other types of integrations with tag manager. Can you show what to add in head section of Discourse?

Just by editing Theme, I added Tag Manager Script in the </head> section.

Oh but Discourse has a setting to do that for you. Search settings for GTM.

3 „Gefällt mir“

Good to know, we can add GTM script via Settings. Thanks for the hint about better way.
Updated, above quick guide.

@neil There is one problem when I add GTM script via Discourse settings, it places inside body.

Expected: It should be in the head.

discourse


Previously, it was recommended by Google to place in the body.
before


But now, they have updated their guidelines: “Paste this code as high in the <head> of the page as possible”.

Can we make this possible?

5 „Gefällt mir“

Thanks for pointing that out. Yes we should change it to be in the head. Added to my list.

5 „Gefällt mir“

“As high in the <head> as possible”

:roll_eyes: I think they’re just being greedy there. A normal position in the head should be fine.

3 „Gefällt mir“

Depending on the kind of rating you’re after you can also use the ratings plugin, which automatically adds the average rating for a topic as structured data to the topic page html.

Example from a user here: Topic Ratings Plugin

6 „Gefällt mir“

@Gulshan_Kumar I updated our GTM support today so it adds the code to the head and the body according to the new instructions.

7 „Gefällt mir“

Currently I could not see star rating showing in SERP for above two post.

  1. Bunny CDN Review.
  2. Obstetrics and Cynecology at studmed.dk

@Gulshan_Kumar - are you removing star rating in gtm or use any method?

The method which I suggested (using GTM+JSON-LD for star rating) works completely fine. You can continue to use it.

In my case, I intentionally removed from that post due to some personal reason. Nothing else.

1 „Gefällt mir“