• Hi

    I have installed the plugin and setup Google Tag Manager, but I noticed that my Analytics tracked all page views twice.

    I tried to go back to my very first GTM container version (with no tags in!) and check again, and Analytics still track page views twice, which leads me to the conclusion, that it must be the plugin that sends double page view.

    Can anybody help me out with fixing this?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @polerepublic the reason behind “Analytics tracked all page views twice” is that two UA code is injected into your website. One is an old one and another is a global site tag. just remove both UA(old) and global site tag code from the backend,

    and configure your Google Analytics using the GTM, then your problem will be resolved.
    [redacted soliciation for off-forum contact]

    script type='text/javascript'>var gaProperty = 'UA-187452672-1';
    			var disableStr = 'ga-disable-' + gaProperty;
    			if ( document.cookie.indexOf( disableStr + '=true' ) > -1 ) {
    				window[disableStr] = true;
    			}
    			function gaOptout() {
    				document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
    				window[disableStr] = true;
    			}</script><script async src="https://www.googletagmanager.com/gtag/js?id=UA-187452672-1"></script> <script>window.dataLayer = window.dataLayer || [];
    		function gtag(){dataLayer.push(arguments);}
    		gtag('js', new Date());
    		gtag('set', 'developer_id.dOGY3NW', true);
    
    		gtag('config', 'UA-187452672-1', {
    			'allow_google_signals': true,
    			'link_attribution': true,
    			'anonymize_ip': true,
    			'custom_map': {
    				'dimension1': 'logged_in'
    			},
    			'logged_in': 'no'
    		} );</script>
    Thread Starter polerepublic

    (@polerepublic)

    Hi @chiragsolanki

    Thank you very much for replying ?? I understand what you are writing, although I do not understand how I can remove the UA(old) and global site tag? The only thing I have done is installing the plugin (gtm4wp) and created a page view tag in tag manager. Is this wrong?

    // Nina

    Hello @polerepublic it a good if you have configured the pageview tag using GTM.

    You can ask your developer to remove the code from the website, which is manually injected. code may be coming from the plugin like “insert header footer” or other plugins, from the theme settings, or in the header.php file. I can tell you exactly where the code is placed without checking your website backend.

    Thanks
    Chirag

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pageview tracked twice through plugin’ is closed to new replies.