Mobile app version of vmapp.org
Login or Join
Jennifer507

: Random Google Analytics Code Can anyone help me recognize how this code is implementing GA? This isn't the classic GA code you'd apply to a page, nor is it something you'd implement via Google

@Jennifer507

Posted in: #GoogleAnalytics

Can anyone help me recognize how this code is implementing GA? This isn't the classic GA code you'd apply to a page, nor is it something you'd implement via Google Tag Manager. I'm considering if I even need it, but I don't know where it's coming from... (Note I made the UA- ID 000000 on purpose.)

<!-- Google Analytics Code -->
<script type="text/javascript">
var googleAccount = "UA-000000-2";
var tracking_memberType = "Anonymous";
dataLayer.push({'event': 'standardGatc'});
dataLayer.push({'event': 'gaEcommerceDone'});
</script>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jennifer507

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

Without the main Google Analytics javascript file from the analytics servers being inserted into the page as well this code will do absolutely nothing. Even the dataLayer.push method will not do anything as the code is trying to call the dataLayer.push() function and if the analytics main code isn't imported into the page that function does not exist at all and so would be throwing errors in your javascript console.

If you are not trying to add Google Analytics or you don't have the main Google Analytics script file added to your page then you can safely remove this script block from your page without any risk.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme