I am managing a very simple single page site, and my client wants to start a Google Ads campaign for it. I had added some days ago the Google Analytics tracking code to the page:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
//G-XXXXXXXXX is my Analytics code
(I am not using Google Tag Manager because it's a quite simple site, I know how to edit HTML by hand, and we're not planning on using any more tags).
Now, today I started setting up the Ads campaign, and it recommended that I add an Ads conversion tracking code for the event we're after (page views). The code it showed me was this:
<!-- Global site tag (gtag.js) - Google Ads: YYYYYYYYY -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-YYYYYYYYY"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-YYYYYYYY');
</script>
// YYYYYYYY is my Ads account code, I suppose
Don't they look pretty much the same, except for the ID numbers? So which code should I add and in what order? Both, neither, one or the other?
EDIT: did the above, but now I have a slight problem (which I don't even know if it's really a problem), which is that the "Website traffic" default event created in Ads appears as non-verified, and doesn't register conversions. See screen cap: