• Resolved Guyinpv

    (@guyinpv)


    I have a site using MonsterInsights, but the client already outputs GA using Tag Manager.
    When I use Google’s Tag Assistant, it reports tag output twice, I also get two page view “hits” recorded.

    I’m curious if Monster is able to detect that tags are already output and thus avoid outputting it twice, or do I need to do something to prevent Monster from outputting duplicate tags?

    I want to make sure analytics are not misreporting pageviews by recording them twice.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @guyinpv,

    You should really have only 1 GA platform on your site. But, GTM can come in handy for the few things (like videos) that MonsterInsights doesn’t track.

    MonsterInsights can detect duplicate tracking code (except GTM), but it won’t prevent sending duplicate events. So if your client wants to use MonsterInsights and GTM at the same time on the same site, it’s probably best for them to disable all GTM page view type tags in their container.

    Those tags will look like this.

    https://d.pr/BKcbrt

    Thanks for asking 🙂

    Mark

    Thread Starter Guyinpv

    (@guyinpv)

    I guess I figured that would be the answer. Makes sense.

    Part of me wondering if it would make sense for MonsterInsights to have some kind of global switch where you can turn off or adjust analytics code output. This way if a client already connects GA using other tools, I can still use Monster for showing the reports and charts and such, but not for code output.
    I’m probably not the only person who has to balance dueling code output due to 3nd party script injection services like GTM.

    Hi @guyinpv,

    You can disable MonsterInsights tracking with PHP action hooks. See below.

    https://gist.github.com/chriscct7/98aa70dc7832f36575ea7a739209b436

    That way you can avoid running multiple trackers by selectively disabling MonsterInsights tracking. But, you can still enjoy the convenience of analytics reports in your wp-admin area.

    Thanks!

    Mark

    Thread Starter Guyinpv

    (@guyinpv)

    Great! Added to my notes if ever needed!

    Cool. Share & enjoy 😉

    Closing thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.