Title: Plugin is adding text/code to header
Last modified: September 15, 2020

---

# Plugin is adding text/code to header

 *  Resolved [maartenbalcaen](https://wordpress.org/support/users/maartenbalcaen/)
 * (@maartenbalcaen)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-is-adding-text-code-to-header/)
 * Since the last update the plugin Monsterinsights is adding code to the body of
   my site and it is visible in Edge, not in Chrome and Firefox.
 * This is the code that is causing the problem:
 * /*
    <!–[CDATA[ */ var monsterinsights_frontend = {“js_events_tracking”:”true”,”
   download_extensions”:”doc,pdf,ppt,zip,xls,docx,pptx,xlsx”,”inbound_paths”:”[]”,”
   home_url”:”https:\/\/www.designaccessoires.be”,”hash_tracking”:”false”}; /* ]]–
   > */
 * Problem is that I can see the tags /* and */ in the frontend in the top bar on
   the left side on all my pages.
    I have deactivated the plugin for now until this
   problem is fixed.
 * Any help would be appreciated.
 * Thanks in advance!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-is-adding-text-code-to-header%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [David Perroud](https://wordpress.org/support/users/davidperroud/)
 * (@davidperroud)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-is-adding-text-code-to-header/#post-13605068)
 * [@maartenbalcaen](https://wordpress.org/support/users/maartenbalcaen/) hello,
   
   did you find a solution ? because i’m facing the same problem right now, and 
   don’t find any solutution,
 * kind regard
 * David
 *  Thread Starter [maartenbalcaen](https://wordpress.org/support/users/maartenbalcaen/)
 * (@maartenbalcaen)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-is-adding-text-code-to-header/#post-13605190)
 * [@davidperroud](https://wordpress.org/support/users/davidperroud/) ,
 * I didn’t get an answer here or from the Monsterinsights support so I decided 
   to remove the Monsterinsights plugin and add the Global site tag from Google 
   analytics to my header.php-file:
 * <!– Global site tag (gtag.js) – Google Analytics –>
    <script async src=”[https://www.googletagmanager.com/gtag/js?id=your](https://www.googletagmanager.com/gtag/js?id=your)
   id”></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){
   dataLayer.push(arguments);} gtag(‘js’, new Date());
 *  gtag(‘config’, ‘your id’);
    </script>
 * Replace your id with your id number from Google analytics of course.
 * Good luck!
 * Maarten
 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-is-adding-text-code-to-header/#post-13605734)
 * This issue is caused on themes that don’t put the wp_head() call in the right
   place in their header file. The call needs to be before </head>.
 * If you’re having issues with locating it, I recommend reaching out to our support
   team at MonsterInsights.com/lite-support/ for help
 * -Chris
 *  [sncs](https://wordpress.org/support/users/sncs/)
 * (@sncs)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-is-adding-text-code-to-header/#post-13646399)
 * On my website the problem was caused by the plugin “Meta Generator and Version
   Info Remover”. After deactivating the option “Remove Google Analytics (MonsterInsights)
   comments” in the plugin settings the text output /* */ is gone.
 *  [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-is-adding-text-code-to-header/#post-13646544)
 * Thanks so much for the update [@sncs](https://wordpress.org/support/users/sncs/)
   🙂
 * I’m sure your info will help others.
 * Cheers,
 * Mark

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin is adding text/code to header’ is closed to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [plugin conflict](https://wordpress.org/support/topic-tag/plugin-conflict/)

 * 5 replies
 * 5 participants
 * Last reply from: [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-is-adding-text-code-to-header/#post-13646544)
 * Status: resolved