My Google Analytics does not work [closed]

0

I have a website in the air and I wanted to have the information of how many people have accessed by day and week, so I created a login in google analytics and registered my site.

Google Analytics generated a code with my ID to put on the head of my site, I put it, but I went to check it and it appears that there is no login on my site.

This is the code:

<!-- Global Site Tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script><script>window.dataLayer=window.dataLayer||[];functiongtag(){dataLayer.push(arguments);}gtag('js',newDate());gtag('config','UA-114428382-1');</script>

Iplaceditonthemainpageofmysite.

ButwhenIcheck,googlegraphicslookslikethis:

    
asked by anonymous 22.02.2018 / 12:36

1 answer

1

There may be many factors that make the data not arrive, for example do not inform the correct id in the googleTagManager API tag script declaration, as I see that is the case of the code that you put here:

<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>

ButIwillignorethisandassumethatthisisjustanexampleandthatyouhavehiddenthecodesforsecurityreasons.

Inoticedthatyouarepushinginformationincorrectly,trythisformat:

window.dataLayer=window.dataLayer||[];[...]window.dataLayer.push({'info1':'xxxx','info2':'xxxx'});

Ialsorecommendthatyouuseatoolforpushdataanalysislikethe dataSlayer > These tools will help you capture push information even if your registration is still in the google approval phase (as stated by hugocsl in the comments), ensuring that you see this data even though you still can not pass them to GTM.

    
22.02.2018 / 12:51