Answer the question
In order to leave comments, you need to log in
Where can I find the counter code in Google Analytics?
Greetings
, I removed the Google Analytics counter code from the site, logged into my Analytics account and now I can’t find a place to copy this code. I've been pushing buttons for half an hour. Where is he?
PS
Found the code:
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXXX');
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXXXX', 'auto');
ga('send', 'pageview');
</script>
Answer the question
In order to leave comments, you need to log in
Google has moved its analytics from using the analytics.js script to the gtag.js script.
Therefore, now for inserting into the site, Google offers the version of the code that comes second to you. Your first option continues to work, but it is recommended to switch from it to the new option.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question