# Embed Request: Option to NOT Load Google Analytics or Other Unnecessary Scripts in the Embedded iFrame JS

**URL:** https://meta.discourse.org/t/embed-request-option-to-not-load-google-analytics-or-other-unnecessary-scripts-in-the-embedded-iframe-js/73687
**Category:** Feature
**Created:** [08.Ноябрь.2017 13:27:04 UTC](https://meta.discourse.org/t/embed-request-option-to-not-load-google-analytics-or-other-unnecessary-scripts-in-the-embedded-iframe-js/73687 "2017-11-08T13:27:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Berto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/berto/32/77084_2.png) [@Berto](https://meta.discourse.org/u/Berto)
#### Post date: [08.Ноябрь.2017 13:27:04 UTC](https://meta.discourse.org/t/embed-request-option-to-not-load-google-analytics-or-other-unnecessary-scripts-in-the-embedded-iframe-js/73687/1 "2017-11-08T13:27:04Z")

</div>

Continuing the discussion from [Embedding Discourse Comments via Javascript](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963/236),

I noticed that when embedding my Discourse Forum (which has been configured with Google Analytics via the Admin fields) into my Blog as blog comments, it was loading Google Analytics JS files twice – once from the blog’s calls, once from the Embed’s calls.

This then added more resources to be downloaded on the calling site, and could double your statistics across your entire business.

There should be an option to _not_ load Analytics and potentially any other unnecessary scripts to save bandwidth/requests on the site embedding Discourse. Embed should be more bare bones IMHO.

The current workaround is to stop using the official Google Analytics options and just put the call into your forum’s head. Then it’s not called in the embed.

---

<div class="post-metadata">

### Author: ![Berto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/berto/32/77084_2.png) [@Berto](https://meta.discourse.org/u/Berto)
#### Post date: [08.Ноябрь.2017 23:05:16 UTC](https://meta.discourse.org/t/embed-request-option-to-not-load-google-analytics-or-other-unnecessary-scripts-in-the-embedded-iframe-js/73687/2 "2017-11-08T23:05:16Z")

</div>

Addendum,

Even with my workaround, I’m still getting multiple downloads of Google Tag Manager’s JS, one for the blog, one for the embedded JS.

Some people may want this one, but I don’t. Not sure how to disable since I’ve never set it up in Discourse in the first place. :sadpanda:

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [08.Ноябрь.2017 23:06:27 UTC](https://meta.discourse.org/t/embed-request-option-to-not-load-google-analytics-or-other-unnecessary-scripts-in-the-embedded-iframe-js/73687/3 "2017-11-08T23:06:27Z")

</div>

This seems pretty important due to the double-counting problem. Does anyone know if it would be a difficult fix?

---

<div class="post-metadata">

### Author: ![Berto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/berto/32/77084_2.png) [@Berto](https://meta.discourse.org/u/Berto)
#### Post date: [08.Ноябрь.2017 23:09:20 UTC](https://meta.discourse.org/t/embed-request-option-to-not-load-google-analytics-or-other-unnecessary-scripts-in-the-embedded-iframe-js/73687/4 "2017-11-08T23:09:20Z")

</div>

Thanks for your interest!

If you want to verify, check it out in Pingdom Tools on a site that’s using the embed. That’s what I’m using (Pingdom Tools), but it’s tough bouncing back and forth between modes and clearing blog’s cache
