Forum Moderators: phranque

Message Too Old, No Replies

Using Google Tag Manager

         

csdude55

5:13 am on Jun 22, 2023 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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 :-/

tangor

7:15 am on Jun 22, 2023 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hmmm... on my side, any thing that g asks me to code I avoid like the plague (except for that adsense snippet/js). Never got any value from "Tag Manager" so never played.

Willing to be educated as regards the value of Tag Manager for individual websites, both as seeding users to the site, or monetary value (by which venue?).

csdude55

6:36 pm on Jun 22, 2023 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I thought that the whole point was so that I wouldn't have to have import several different tags; eg, one for Adsense, one for Analytics, one for jQuery, etc. But looking at it now, it seems like it's just something to let you customize analytics?

[marketingplatform.google.com...]

After 2 days of poking around it LOOKS like there are a lot of options, and surely people are benefitting from all of these different services or they wouldn't exist. That makes me feel like I'm leaving money on the table out of ignorance, which is super frustrating since nothing ever says HOW these services can help.

Shoot, I just spent 3 hours setting up GA4, and I'm really not sure if it's done right. Now my head hurts and I'm ready to start drinking! LOL

blend27

3:53 pm on Jul 15, 2023 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> feel like I'm leaving money on the table

For Who?

jinxed

1:31 pm on Jul 16, 2023 (gmt 0)

10+ Year Member



I set this up a while back, took a bit of time to figure out.

The advantage for me is that it doesn't fire the analytics/AdSense code until the user consents. I wanted to build my own cookie consent solution to avoid using a 3rd party solution.