I'm a back end developer, sometimes a little fronted, but not a SEO related expert at all. Now I have to make a full website from top to bottom and I'm stuck with the Google stuff. First I created a Google Analytics profile, I got the srcipt that I needed to hardcode to all my site.
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MEASUREMENT_ID></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-MEASUREMENT_ID'); </script>
However, a little while later, I started to use Google Ads and it recommended to connect my Analytics page to the Ads page, so I connected them and I got another code that I needed to insert.
The code snippet is almost the same, except the two MEASUREMENT_ID, because now I got a UA-MEASUREMENT_ID.
So, do I have to use both snippets, or just one? If so, which MEASUREMENT_ID should I use? Or am I screwed up something?
Thanks all the help