Visualizzare la valutazione a stelle su Discourse è semplice. Sono felice di condividere che può essere fatto in pochi passaggi semplici.
Procedura
Configura Google Tag Manager per la tua applicazione Discourse
Aggiungi un nuovo tag HTML contenente il markup JSON-LD
Filtra il trigger per visualizzazione pagina per un URL specifico
Pubblica e attendi 24 ore per vedere il risultato nei risultati dei motori di ricerca (SERP).
Grazie
8 Mi Piace
Interesting. Where are you getting the rating from, Google?
1 Mi Piace
neil
(Neil Lalonde)
1 Aprile 2018, 3:40pm
4
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.
neil
(Neil Lalonde)
1 Aprile 2018, 4:18pm
6
Oh but Discourse has a setting to do that for you. Search settings for GTM.
3 Mi Piace
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.
Previously, it was recommended by Google to place in the body.
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 Mi Piace
neil
(Neil Lalonde)
1 Aprile 2018, 11:49pm
9
Thanks for pointing that out. Yes we should change it to be in the head. Added to my list.
5 Mi Piace
riking
(Kane York)
2 Aprile 2018, 5:21am
10
“As high in the <head> as possible”
… I think they’re just being greedy there. A normal position in the head should be fine.
3 Mi Piace
angus
(Angus McLeod)
2 Aprile 2018, 5:57am
11
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 Mi Piace
neil
(Neil Lalonde)
3 Aprile 2018, 7:26pm
12
@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 Mi Piace
PoojaPatel
(Pooja Patel)
14 Aprile 2019, 2:19pm
13
Currently I could not see star rating showing in SERP for above two post.
Bunny CDN Review.
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 Mi Piace