# Tecnoblog's Experience With Discourse Comments

**URL:** https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721
**Category:** Feature
**Tags:** embedding
**Created:** [April 15, 2026, 6:15pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721 "2026-04-15T18:15:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Thiago\_Mobilon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thiago_mobilon/32/177756_2.png) [@Thiago\_Mobilon](https://meta.discourse.org/u/Thiago_Mobilon)
#### Post date: [April 15, 2026, 6:15pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/1 "2026-04-15T18:15:07Z")

</div>

Hi there!

I’m really excited about this new feature. I’ve been waiting for a solution like this for a long time, and the initial feedback from our readers at Tecnoblog has been great – they love having the community integrated.

However, after some real-world testing, I’ve spotted a few technical hurdles we need to clear to make this feel like a truly native commenting system and, more importantly, to make it sustainable for high-traffic sites.

Here’s what I’ve found so far:

### **1. Performance & Server Load**

Our server load spiked significantly after we embedded the full app. Looking at Cloudflare, our request volume **multiplied by 10**. A few ideas on how to optimize this:

- **Lazy Loading:** Implementing lazy load for the JS helps a lot (I’m already using a workaround for this).

```plaintext
            <script type="text/javascript">
                DiscourseEmbed = {
                    discourseUrl: '<?php echo esc_url($discourse_url); ?>',
                    
                    <?php if ($use_topic_id): ?>
                        // Modo ID: Tópico salvo no banco, imune a mudanças de URL
                        topicId: <?php echo intval($topic_id); ?>,
                    <?php else: ?>
                        // Modo URL: Fallback quando a criação via API falha
                        discourseEmbedUrl: '<?php echo esc_url($permalink); ?>',
                    <?php endif; ?>
                    fullApp: true,
                    embedHeight: '800px',
                };

                (function() {
                    var container = document.getElementById('discourse-comments');

                    // Verifica se o navegador suporta IntersectionObserver
                    if ('IntersectionObserver' in window) {
                        var observer = new IntersectionObserver(function(entries, observer) {
                            entries.forEach(function(entry) {
                                if (entry.isIntersecting) {
                                    // Quando o div entra na tela, carrega o script
                                    loadDiscourse();
                                    observer.unobserve(entry.target);
                                }
                            });
                        }, { rootMargin: "1500px" }); // Carrega 1500px antes de chegar no div

                        observer.observe(container);
                    } else {
                        // Fallback para navegadores antigos
                        loadDiscourse();
                    }

                    function loadDiscourse() {
                        var d = document.createElement('script'); 
                        d.type = 'text/javascript'; 
                        d.async = true;
                        d.src = window.DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
                        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
                    }
                })();
            </script>

```

Here you can see the number of requests dropping after the Lazy Load was implemented (and some parts of the website were still cached, so it’s not the final result):

 ![Screenshot 2026-04-02 at 20.56.36](https://global.discourse-cdn.com/meta/original/4X/9/7/0/970546033c05f4464ef525e8f9bb4bd1ddd5a0a9.png)

- **Stripping the payload:** Can we reduce the resources loaded within the embed? Ex: i noticed queries for Chat URLs and AI credit checks—are these necessary for the embed view?

- **Request Frequency:** The real-time POST requests are a bit aggressive. Maybe we can dial back the polling frequency for the embed version?

- **Cache:** Improved cache management for embedded topics to handle traffic spikes.

### **2. Analytics Mess**

Right now, the embed is firing Google Analytics/GTM scripts. This is doubling our pageviews (one hit for the post, another for the iframe), which messes up our data. It would be ideal if the system could detect it’s in an iframe and kill any tracking scripts automatically (the Discourse analytics too).

### **3. The iFrame Height Issue**

This is probably the biggest hurdle for UX. If a post has no comments, there’s a weird empty gap. If it has a long thread, the iframe gets cut off within the first 2 or 3 comments, forcing a “scroll-within-a-scroll” which is pretty bad, especially on mobile.

To really compete with something like Disqus, we need the height to be dynamic (according to the number of comments) and also have a “Read More” button that expands the thread after a certain number of replies.

 ![Screenshot 2026-04-03 at 16.37.10](https://global.discourse-cdn.com/meta/original/4X/b/a/b/bab8300e1b8c96ca55efbc874ff9d8434a7a3e5a.jpeg)

 ![Screenshot 2026-04-06 at 19.41.23](https://global.discourse-cdn.com/meta/original/4X/2/e/e/2eea0e00946710d351e6a08c57a0393517e5a5bb.jpeg)

### **4. Plugin Conflicts**

Since the embed loads all active plugins, we’re seeing some weird behavior. For example, “Google One Tap” pops up inside the blog post. When a user logs in, the iframe refreshes and drops them on the community homepage instead of the comment thread. Being able to manually disable specific plugins for the embed view would be a lifesaver.

 ![Screenshot 2026-04-15 at 14.53.19](https://global.discourse-cdn.com/meta/original/4X/2/6/d/26d990117473187c49e89190adaa62e81b7b72c6.jpeg)

### **5. Login Friction**

The current flow is a bit of a conversion killer: User clicks login → New tab opens → Login happens → User is left on the community homepage. Back on the blog post, the iframe still looks logged out until the user manually refreshes the whole page. It’s a confusing loop that makes people give up and leave before commenting.

Since we activated the new embed, our **daily registrations have more than doubled** , which is great. However, our engagement metrics haven’t moved at all. In fact, our **DAU/MAU dropped** – we have more logged-in users, but they aren’t interacting. Metrics like “Daily Engaged Users,” “New Contributors,” and “Postings” haven’t seen any increase.

This proves that people _want_ to join the conversation, but they’re getting lost in the login loop and abandoning the post before they can actually comment.

### **6. Mobile UI**

On mobile, the reply window takes up the entire screen, so you lose all context of the conversation you’re replying to. It feels a bit claustrophobic—anything we can do to keep it more compact would be a huge win.

* * *

I really want to make this the default system for Tecnoblog (and also in another site we own). Let me know if you want to dive deeper into any of these points!

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [April 15, 2026, 6:23pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/2 "2026-04-15T18:23:12Z")

</div>

> [@Thiago\_Mobilon](#):
>
> For example, “Google One Tap” pops up inside the blog post. When a user logs in, the iframe refreshes and drops them on the community homepage instead of the comment thread.

This will be fixed by

[https://github.com/discourse/discourse-google-one-tap/pull/57](https://github.com/discourse/discourse-google-one-tap/pull/57)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 6:43pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/3 "2026-04-15T18:43:51Z")

</div>

Thanks for the detailed feedback @Thiago_Mobilon !

I will work the list and try to cover everything eventually.

> [@Thiago\_Mobilon](#):
>
> **Cache:** Improved cache management for embedded topics to handle traffic spikes.

I just did a check here, and looks like your CSS in misconfigured on your Discourse site. You have double `cache-control` headers, and one of them is `no-cache`.

```plaintext
curl -v https://tecnoblog.net/comunidade/stylesheets/common_cd45efa28175431b0b8ff143783178d55206920b.css?__ws=tecnoblog.net -s 2>&1 | grep cache-control
< cache-control: max-age=31556952, public, immutable
< cache-control: no-store, no-cache, must-revalidate, private

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 6:48pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/4 "2026-04-15T18:48:12Z")

</div>

> [@Thiago\_Mobilon](#):
>
> ### **2. Analytics Mess**
> 
> Right now, the embed is firing Google Analytics/GTM scripts. This is doubling our pageviews (one hit for the post, another for the iframe), which messes up our data. It would be ideal if the system could detect it’s in an iframe and kill any tracking scripts automatically (the Discourse analytics too).

Are you using the Discourse built-in Google Analytics integration?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:00pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/5 "2026-04-15T20:00:49Z")

</div>

> [@Thiago\_Mobilon](#):
>
> i noticed queries for Chat URLs and AI credit checks—are these necessary for the embed view?

Handling these in

[https://github.com/discourse/discourse/pull/36613](https://github.com/discourse/discourse/pull/36613)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:10pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/6 "2026-04-15T20:10:33Z")

</div>

> [@Thiago\_Mobilon](#):
>
> To really compete with something like Disqus, we need the height to be dynamic (according to the number of comments)

Handled in

[https://github.com/discourse/discourse/pull/39297](https://github.com/discourse/discourse/pull/39297)

---

<div class="post-metadata">

### Author: ![Thiago\_Mobilon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thiago_mobilon/32/177756_2.png) [@Thiago\_Mobilon](https://meta.discourse.org/u/Thiago_Mobilon)
#### Post date: [April 15, 2026, 8:20pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/7 "2026-04-15T20:20:05Z")

</div>

> [@Falco](#):
>
> I just did a check here, and looks like your CSS in misconfigured on your Discourse site. You have double `cache-control` headers, and one of them is `no-cache`.

I believe Cloudflare must have added that header because I bypassed the cache for the `/comunidade/` directory. If I don’t remove it, it will apply its caching rules to the Discourse CSS and JS, which could potentially create conflicts later on.

Anyway, when I brought up the caching issue, it was more with the aim of reducing the server load. The CSS files are static, correct? If so, the fact that they are not cached, while undesirable, wouldn’t directly impact the server load.

---

<div class="post-metadata">

### Author: ![Thiago\_Mobilon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thiago_mobilon/32/177756_2.png) [@Thiago\_Mobilon](https://meta.discourse.org/u/Thiago_Mobilon)
#### Post date: [April 15, 2026, 8:22pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/8 "2026-04-15T20:22:41Z")

</div>

> [@Falco](#):
>
> Are you using the Discourse built-in Google Analytics integration?

I am utilizing the Discourse integration with Google Tag Manager.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:27pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/9 "2026-04-15T20:27:48Z")

</div>

> [@Thiago\_Mobilon](#):
>
> Anyway, when I brought up the caching issue, it was more with the aim of reducing the server load. The CSS files are static, correct? If so, the fact that they are not cached, while undesirable, wouldn’t directly impact the server load.

They impact end user performance, as they are 59 requests downloading 1.43MB of CSS (compressed to 340KB) on every article.

And they are also served by the Ruby server, as we expect sites to not break the cache, meaning that in normal conditions this route is very rarely used.

If I’m not mistaken, serving those with a broken cache means they even hit the database.

> <https://github.com/discourse/discourse/blob/main/app/controllers/stylesheets_controller.rb#L38>

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:28pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/10 "2026-04-15T20:28:30Z")

</div>

> [@Thiago\_Mobilon](#):
>
> **Lazy Loading:** Implementing lazy load for the JS helps a lot (I’m already using a workaround for this).

This is a great idea, I’m adding native support for it

[https://github.com/discourse/discourse/pull/39299](https://github.com/discourse/discourse/pull/39299)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:31pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/11 "2026-04-15T20:31:30Z")

</div>

> [@Thiago\_Mobilon](#):
>
> On mobile, the reply window takes up the entire screen, so you lose all context of the conversation you’re replying to. It feels a bit claustrophobic—anything we can do to keep it more compact would be a huge win.

That is a more general issue with composing on the go, and will benefit from improvements from [Creating/Editing a post on mobile: let's discuss the 2026 Discourse experience](https://meta.discourse.org/t/creating-editing-a-post-on-mobile-lets-discuss-the-2026-discourse-experience/400393).

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:33pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/12 "2026-04-15T20:33:53Z")

</div>

> [@Thiago\_Mobilon](#):
>
> **Cache:** Improved cache management for embedded topics to handle traffic spikes.

We have an amazing cache for anonymous users hitting topic pages, and it also covers this new mode, so you should be able to scale well to handle spikes as long as there are enough Pitchfork workers and Redis I/O workers.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:35pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/13 "2026-04-15T20:35:50Z")

</div>

> [@Thiago\_Mobilon](#):
>
> **Request Frequency:** The real-time POST requests are a bit aggressive. Maybe we can dial back the polling frequency for the embed version?

Pooling automatically dials down on background tabs or during high load events, and the same should apply here.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 15, 2026, 8:56pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/14 "2026-04-15T20:56:15Z")

</div>

> [@Thiago\_Mobilon](#):
>
> ### **2. Analytics Mess**
> 
> Right now, the embed is firing Google Analytics/GTM scripts. This is doubling our pageviews (one hit for the post, another for the iframe), which messes up our data. It would be ideal if the system could detect it’s in an iframe and kill any tracking scripts automatically (the Discourse analytics too).

Opted into tagging those in

[https://github.com/discourse/discourse/pull/39302](https://github.com/discourse/discourse/pull/39302)

---

<div class="post-metadata">

### Author: ![Thiago\_Mobilon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thiago_mobilon/32/177756_2.png) [@Thiago\_Mobilon](https://meta.discourse.org/u/Thiago_Mobilon)
#### Post date: [April 16, 2026, 5:17pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/15 "2026-04-16T17:17:30Z")

</div>

> [@Falco](#):
>
> Handled in
> 
> [UX: Support dynamic iframe height for full app embed mode by xfalcox · Pull Request #39297 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/39297)

I am encountering difficulties in getting dynamic height to function correctly. Despite updating Discourse and refreshing my snippet with the latest configurations, the issue persists.

```plaintext
        <h4 class="comments-main-title component-title">Comentários</h4>
        <div id='discourse-comments'></div>

        <meta name='discourse-username' content='<?php echo esc_attr($discourse_author); ?>'>

        <script type="text/javascript">
            DiscourseEmbed = {
                discourseUrl: '<?php echo esc_url($discourse_url); ?>',
                
                <?php if ($use_topic_id): ?>
                    // Modo ID: Tópico salvo no banco, imune a mudanças de URL
                    topicId: <?php echo intval($topic_id); ?>,
                <?php else: ?>
                    // Modo URL: Fallback quando a criação via API falha
                    discourseEmbedUrl: '<?php echo esc_url($permalink); ?>',
                <?php endif; ?>
                fullApp: true,
                lazyLoad: true, // disable lazy loading of the iframe
                lazyLoadMargin: '1500', // pixels before viewport to start loading
                dynamicHeight: true,
                embedMinHeight: '400',
                embedMaxHeight: '3000',
					  embedHeight: '800px',
                // className: 'CLASS_NAME',
            };

            (function() {
            var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
            d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
            })();
        </script>

```

[https://tecnoblog.net/noticias/samsung-wallet-agora-suporta-pix-por-aproximacao/](https://tecnoblog.net/noticias/samsung-wallet-agora-suporta-pix-por-aproximacao/)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [April 16, 2026, 5:21pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/16 "2026-04-16T17:21:44Z")

</div>

> [@Falco](#):
>
> > [@Thiago\_Mobilon](#):
> >
> > **Lazy Loading:** Implementing lazy load for the JS helps a lot (I’m already using a workaround for this).
> 
> This is a great idea, I’m adding native support for it
> 
> [PERF: Lazy load full app embed iframe with IntersectionObserver by xfalcox · Pull Request #39299 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/39299)

Could we use `<iframe loading="lazy">` here? That way, we don’t need custom JS or intersection observers?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 16, 2026, 5:24pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/17 "2026-04-16T17:24:58Z")

</div>

Oh that is now widely supported across browsers? TIL! Will change is ASAP.

[https://github.com/discourse/discourse/pull/39320](https://github.com/discourse/discourse/pull/39320)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 16, 2026, 5:35pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/18 "2026-04-16T17:35:11Z")

</div>

Thanks for testing, found the issue

[https://github.com/discourse/discourse/pull/39321](https://github.com/discourse/discourse/pull/39321)

---

<div class="post-metadata">

### Author: ![Thiago\_Mobilon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thiago_mobilon/32/177756_2.png) [@Thiago\_Mobilon](https://meta.discourse.org/u/Thiago_Mobilon)
#### Post date: [April 16, 2026, 7:00pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/19 "2026-04-16T19:00:07Z")

</div>

Excellent! The dynamic height is now functioning as expected. However, this has introduced a minor issue: when I click to respond, the input field for the reply attempts to adjust to the iframe’s height. In this instance, it has erroneously become 7385px in height.

The post contained 31 comments, and the embedded iframe was 9757px tall (I had set the embedMaxHeight to 15000px).

 ![Screenshot 2026-04-16 at 15.57.43](https://global.discourse-cdn.com/meta/original/4X/d/5/9/d59419f060babf70b2387d14d298f1ae97fc8cd3.png)

 ![Screenshot 2026-04-16 at 15.56.20](https://global.discourse-cdn.com/meta/original/4X/5/a/f/5aff12d29519eb38f3f6e9c609528b8d30bad54d.jpeg)

[https://tecnoblog.net/noticias/samsung-wallet-agora-suporta-pix-por-aproximacao/](https://tecnoblog.net/noticias/samsung-wallet-agora-suporta-pix-por-aproximacao/)

Update: I’ve actually noticed that the comment form expands the iframe’s height to its maximum, so when I click “discard”, the layout ends up with a huge blank space remaining below the comments.

![Screenshot 2026-04-16 at 16.03.37](https://global.discourse-cdn.com/meta/original/4X/6/d/6/6d6e0a7d90cca6fc685c7188b2f8ea71ffb6df8a.png)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 16, 2026, 7:15pm UTC](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721/20 "2026-04-16T19:15:12Z")

</div>

I think you will need a `max-height` at a more sane value there, like 1000 to 1500px.

So this feature will cover your initial problem of

> [@Thiago\_Mobilon](#):
>
> If a post has no comments, there’s a weird empty gap.

and scales up to a certain point, but given Discourse native infinite scroll behavior, you don’t want the height for increase that much.

This feature won’t remove the “scroll withing scroll” anytime soon.

As for mobile composer, I’m looking into what we can do here.

[Next page](https://meta.discourse.org/t/tecnoblogs-experience-with-discourse-comments/400721.md?page=2)
