• Resolved maartenbalcaen

    (@maartenbalcaen)


    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 to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • David Perroud

    (@davidperroud)

    @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

    (@maartenbalcaen)

    @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 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

    (@chriscct7)

    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

    (@sncs)

    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.

    Thanks so much for the update @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.