With Google’s gtag.js, the Future is later…

What the heck is a gtag.js and why should you care?

For the past few weeks I have been fielding a lot of questions about gtag.js on the Analytics Course forums. Students are asking why my recommended method of tracking sites is analytics.js, yet their account only allows them to install gtag.js on their site.

The same thing goes for Google AdWords conversion tracking. The only option is to install gtag.js.

What gives?

You may be wondering the same thing since gtag.js is the only script-based tracking option we see inside of our Google Analytics accounts.

Why, Jeff, are you recommending one thing, and Google is saying something different! 

This tag was rolled out with little fanfare, so it’s natural to be confused about what is happening.

This post aims to clear up some of the most common questions.

I’m sure that gtag.js will be awesome, someday

To tell the truth, I don’t know much about gtag.js, because I don’t like trusting my advertising and marketing data to incomplete Google products. I have not used gtag.js, because it would be insane to use it at this point in time. This post will show you why.

Maybe I’m cautious after being burned by Google Wave, Google Buzz and the first time Google released Universal Analytics into the wild.

Or I’m damaged after moving too fast to Google’s “biggest and baddest” systems too soon in the past, and I don’t want to make the same mistake again.

Or maybe I’m just annoyed that Google is forcing this change upon us, yet not even telling their product team at GTM about the change.

Or maybe I’m just hangry because I spent my entire lunch time trying to get the new AdWords interface to load, only to find the new conversion tracking system won’t work in Google Tag Manager. Low blood sugar is no joke, folks.

But the bottom line is that gtag.js is stupid, and I’m pretty sure I hate that it exists. And 6 months from now I will completely change course and announce that I love gtag.js and eat my words. And you’ll be able to dig up this post and point at me and say ha ha!

Yep, I’m definitely hangry.

One tag to rule them all

We’ve all heard this one before. Google wants to simplify user experience and make things easier for us dum-dums who don’t know our mouth-holes from our arse-holes. So they introduce a piece of tracking that is supposed to make things easier.

AND ALL HELL BREAKS LOOSE

Because they release an incomplete set of protocols and expect users to make the switch. Because they subject us to their half-baked ideas; standards that aren’t ready for prime-time.

Something that doesn’t even work with other Google products! 

No offense to you, Gtag.js, but WHAT ABOUT GTM?

If you read any of Google’s own marketing materials, it’s clear they think their users are not very smart. They undermine their intelligence with nearly every piece of marketing collateral. Over-simplifying every step of the way. Dumbing things down, as if marketers and analysts don’t want the details.

And yet tools like Google Tag Manager gain mass adoption from users, because we are dying for details. We want the benefits of a technically sound analytics implementation, without the slow cycles that come from putting everything in the hands of developers. Same goes for Google Analytics. It’s successful because it’s accessible to everyone.

There is no reason for gtag.js in a world where everyone uses Google Tag Manager. It is solving the same fundamental problem, only in a more limited way.

What about Google Tag Manager?

This post started when I tried to install conversion tracking for a new AdWords account. I created a conversion event, and was given the following code to place on every page of my site. Plus another piece of code for the conversion event.

First of all, this is way more work than the old method of conversion tracking. But I’ll humor you, Google.

So I went into Google Tag Manager to get this code on the site, only to find nothing of consequence.

No mention of gtag.js anywhere. Just support for the “old” way of doing things. When I say “old” I mean the ways that have worked for years, only to suffer a violent death in the past few weeks. Methods that are now impossible to utilize, since Google no longer displays the parameters you need to make AdWords Conversion Tracking work.

That makes this change not just annoying, but impossible. Google is requiring their advertisers to strip GTM from their site in order to track a Google AdWords conversion. I’m sure that wasn’t their intent, but it’s my reality.

They have changed their entire tracking process with no way to make it work. Forcing an incomplete product on all of us without any support or documentation. C’mon Google, you’re better than this! 

Fortunately, my account needs are simple. So I just imported my goals from Google Analytics and moved on. But there’s no way major advertisers can move this fast. Think about it this way: the internal Google Tag Manager team hasn’t even implemented this yet! And they likely knew about the change for years before it went live.

One swift Google product update made another Google product obsolete. At least until they implement a solution.

Why am I so concerned? Because I think gtag.js breaks Google Tag Manager

Update: I assumed wrong. Here’s a tweet that eased my concerns from Brian Kuhn at Google (aka the guy who is responsible for all the awesome code we use + Google Tag Manager. If he says that they are meant to be together, I eat humble pie. Thanks Brian!) Of course, the second part is really my biggest issue. Will update with responses if there is a solution I’m missing. 

This is a time where I’m prepared to be wrong with my assumption, because I am not 100% certain.

But if I put gtag.js onto my site, wouldn’t it break Google Tag Manager?

The reason why I am suspicious of gtag.js is because is uses the same dataLayer as GTM, but instantiates it independently.

My JavaScript skills aren’t quite at a Simo Ahava or Mike Arnesen level, but I am suspicious of putting these two trackers on the same site. Wouldn’t the first data layer be wiped out by the second one?

If gtag.js is defining the datalayer before or after Google Tag Manager, wouldn’t the datalayer get re-set? My CIS degree says yes, but my hangry status says “go eat something before you pass out.”

Does anyone know the answer here? Is it safe to have gtag.js and GTM on the site at the same time? Is GTM going to be replaced by gtag?

So many questions. So little documentation or answers from Google.

Google, please hire me to manage roll-outs

Here’s my job application.

When you create a new feature or product enhancement for your analytics and advertising products, I will run it through a common sense filter. It works like this.

  1. Internal liaison – I will ask you if this change will cause your other products to break or create a spider trap for users. We will address it before launching.
  2. Voice of the people – I will think of all of the questions that you are going to get from your users, and make sure that they are addressed before the push goes live.
  3. User testing – We will do a soft launch to a small percentage of users to get their feedback on the change, what they like about it and how it can improve.
  4. Proper documentation – I will document the concerns people will have with the switch and thoroughly explain everything that they must do to make this work, how it can be done, and what timeline it should fall into.
  5. Common ground – I will write a note to all users explaining the changes in plain English (and hire local translators if we have the budget), telling them what is happening, and where to find more information.
  6. Closing the loop – I will study analytics for these products to see if there are any nagging issues, and report on whether it was a success or not.
  7. True sentiment – I will implement a survey of users that collects data about their experience, to add qualitative data into the mix.
  8. Diffusion – I will be a cheerleader of the change, telling users about the positive aspects of the new product/feature and championing the usage. I will provide real timelines for when they should implement and how things should best be handled. Users will be thankful for the change by the time I get done with them.
  9. Promotion – Each major change will be promoted to your install base via a videos and webinars to highlight the value of each development.
  10. Acceptance – Users will accept these changes due to strong communication. They will not be happy about change in general (nobody is), but they will be excited to for the opportunity and advanced notice.

That’s the plan. And you don’t even need to hire me, I’m already doing it for you in my training courses.

Of course, bringing me onboard would solve your communication problems and help me reach a bigger audience. You know where to find me.

I still don’t know where gtag.js fits into the world of tracking

Is it replacing Google Tag Manager?

Is it already Google Tag Manager?

When will it be necessary to switch?

When will it support all of the great functionality found in analytics.js?

What will an installation look like if you want to track both AdWords and analytics in the same tag?

What benefit will it provide users over time?

Does it make us more reliant on Google? Or less?

If you have any thoughts, please leave a comment. I am as much a student as a teacher on this one.

About the Author

Jeff Sauer is an independent Digital Marketing Consultant, Speaker and Teacher based out of a suitcase somewhere in the world. Formerly of Minneapolis, MN and San Francisco, CA.