I have a website that sits on multiple domains, and I want to track them universally. For now, I don't care about statistics per-domain, I just want to see overall page views. I also don't care about links between domains - they could be counted as two sessions.
So in the https://analytics.google.com dashboard, I've created a new property, but it required me to enter a "Default URL" (where I picked only one of my domains). Then I found the Tracking Code, which begins with
<!-- Global site tag (gtag.js) - Google Analytics -->.
I then read about universal tracking with Tag Manager: https://support.google.com/tagmanager/answer/6164469 so I created a tag of type "Google Analytics: Universal Analytics" with a variable with the tracking id from the Google-Analytics' property, and with Cross Domain Tracking configured with all of my domain names (separated with a comma).
The Tag Manager has a button in the title bar that looks like: "GTM-..." - it opens a popup window titled "Install Google Tag Manager" with some code that I need to embed in the head tag:
<!-- Google Tag Manager --> and some code to embed in the body tag:
<!-- Google Tag Manager (noscript) -->.
Do I need to embed only the gtag code? only the Google Tag Manager code? Or both?