I honestly never can figure out any of the Google UIs. Their documentation is impossible to figure out, it's like they want you to just log in and... go. With no direction or any idea of why you're even there!
So it is with TagManager:
[
tagmanager.google.com...]
A long time ago I set it up so that I could use it to plug in Analytics code, but it was really just so I don't even know why I did it:
<?php
$analytics = 12345;
echo <<<EOF
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-$analytics"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-$analytics');
</script>
EOF;
Now I'm working with an ad company that says you can connect to Tag Manager to potentially get better rates. Why? No idea. But all they need is the ID.
So I log in, and all I see is a big empty workspace with no clue what I should be doing with it! All I can find is that, in addition to the above code, apparently I also have to plug in:
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-12345');
</script>
What in the world?!
Why do I have all of this illegible code? Is this supposed to accomplish something greater than I'm seeing?
I've read several of these until my eyes are crossed:
[
semrush.com...]
but honestly, either they're written for people that already know what to do and don't need a tutorial, or I'm just getting dumber and dumber in my old age. Cause I've been reading for the last 2 hours and I think I know less now than I did before I started :-/