# Exibir pontuações de estrelas para páginas do Discourse nos resultados de busca (SERPs)

**URL:** https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316
**Category:** Developers
**Tags:** how-to
**Created:** [Abril 1, 2018, 9:23am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316 "2018-04-01T09:23:45Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Gulshan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gulshan_kumar/32/119562_2.png) [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)
#### Post date: [Abril 1, 2018, 9:23am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/1 "2018-04-01T09:23:45Z")

</div>

Exibir classificação por estrelas no Discourse é fácil. Estou feliz em compartilhar, pode ser feito em poucos passos simples.

**Processo**

1. Configure o Google Tag Manager para sua aplicação Discourse  

2. Adicione uma nova tag HTML contendo a marcação JSON-LD  

3. **Filtre o gatilho por visualização de página** para uma URL específica  

4. Publique e aguarde 24 horas para ver o resultado nos SERPs.  

Obrigado.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [Abril 1, 2018, 9:33am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/2 "2018-04-01T09:33:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Gulshan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gulshan_kumar/32/119562_2.png) [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)
#### Post date: [Abril 1, 2018, 9:40am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/3 "2018-04-01T09:40:13Z")

</div>

Yes, it is Google SERPs. 😊

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [Abril 1, 2018, 3:40pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/4 "2018-04-01T15:40:40Z")

</div>

> [@Gulshan\_Kumar](#):
>
> Create a new container at Tag Manager add tag in head section of Discourse

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

---

<div class="post-metadata">

### Author: ![Gulshan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gulshan_kumar/32/119562_2.png) [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)
#### Post date: [Abril 1, 2018, 4:16pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/5 "2018-04-01T16:16:58Z")

</div>

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

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/3/a319e297e8f779e60552bcdbe92e9691fc40f476.png)

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [Abril 1, 2018, 4:18pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/6 "2018-04-01T16:18:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Gulshan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gulshan_kumar/32/119562_2.png) [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)
#### Post date: [Abril 1, 2018, 4:24pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/7 "2018-04-01T16:24:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Gulshan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gulshan_kumar/32/119562_2.png) [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)
#### Post date: [Abril 1, 2018, 7:25pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/8 "2018-04-01T19:25:34Z")

</div>

@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](https://global.discourse-cdn.com/meta/original/3X/1/0/10400419a88471e1165277726c6f319404be1b3c.PNG)

* * *

[Previously, it was recommended by Google](https://stackoverflow.com/a/43083948/8278000) to place in the body.

 ![before](https://global.discourse-cdn.com/meta/original/3X/7/9/795c724494db38729b8757a5c41c4235cfc082f7.png)

* * *

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

 ![GTM](https://global.discourse-cdn.com/meta/original/3X/f/6/f6c67a46a86d6b02b2c7cb0215dd9f70a5b75ef4.PNG)

Can we make this possible?

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [Abril 1, 2018, 11:49pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/9 "2018-04-01T23:49:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [Abril 2, 2018, 5:21am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/10 "2018-04-02T05:21:03Z")

</div>

“As high in the `<head>` as possible”

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

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [Abril 2, 2018, 5:57am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/11 "2018-04-02T05:57:48Z")

</div>

Depending on the kind of rating you’re after you can also use the [ratings plugin](https://meta.discourse.org/t/topic-ratings-plugin/39578), 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 - #159 by frold](https://meta.discourse.org/t/topic-ratings-plugin/39578/159)

 ![Screenshot%20at%20Apr%2002%2015-54-56](https://global.discourse-cdn.com/meta/original/3X/a/4/a4f0267e5fccd20ef7a739615343069a2c8cfce8.jpg)

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [Abril 3, 2018, 7:26pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/12 "2018-04-03T19:26:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![PoojaPatel](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@PoojaPatel](https://meta.discourse.org/u/PoojaPatel)
#### Post date: [Abril 14, 2019, 2:19pm UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/13 "2019-04-14T14:19:48Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Gulshan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gulshan_kumar/32/119562_2.png) [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)
#### Post date: [Abril 26, 2019, 10:31am UTC](https://meta.discourse.org/t/display-star-ratings-for-discourse-pages-in-search-engine-results-serps/84316/14 "2019-04-26T10:31:01Z")

</div>

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.
