Invalid Input You May Have Stale Data

Updated: May 6th , 2021. We've all been there: you open Google Tag Manager, set up tags, triggers and variables properly (at least you thought so), but that new implementation doesn't work. You read that super awesome 5-stride tutorial few more times, just it doesn't help.

You feel stuck, irritated and decide information technology's enough GTM for today. The next 24-hour interval you open up GTM, accept a fresh await and realize you did a stupid and obvious mistake (which could accept been fixed in a glimmer of an eye). I've been there. Too many times. That's why I'thousand sharing a list of the well-nigh common Google Tag Director mistakes I've committed or I have noticed that others are doing them. Let's hope this blog mail service will save you lot some time and energy.

Google Tag Manager Ebook Bundle

Table of Contents

Here is the listing of common Google Tag Manager mistakes that are covered in this blog post:

  • Viewing the incorrect Google tag director account
  • The container is not published
  • Using Data Layer variable earlier its respective dataLayer.push occurs
  • Not using preview and debug panel properly
  • Not using other debugging tools
  • Non checking Google analytics real-time reports
  • Not removing old Google Analytics implementation (completely)
  • Not using the GA Settings Variable
  • Using dataLayer = []; and putting it after GTM snippet
  • Using too many motorcar-event listeners
  • Typos (duh…)
  • Non cooperating with developers
  • Not Using Regex in order to reduce the number of weather condition/triggers
  • Publishing all the changes at once
  • Tracking forms with Click Trigger
  • Not having a proper naming convention
  • Final words

Error #1 – Viewing the wrong Google tag manager container

This fault is popular among newbies and/or multi-taskers. The problem of "GTM Preview and Debug way is not working" might exist acquired past a distraction and the wrong GTM account/container.

If you lot track multiple websites and/or have access to multiple Tag Managing director accounts, you might exist using the snippet from another account and/or container (by blow, of form). Double-cheque whether ID in your GTM account is the aforementioned every bit in the Javascript snippet that is hardcoded on a site.

Error #2 – Container is not published

And so you've started working on a new project, gear up upwardly all triggers, variables, tags, etc., but you become way as well little information (every bit if simply your browser is being tracked. But what about all those other visitors?). This has probably happened because yous didn't publish the container.

Once you lot do a significant portion of changes in your GTM container, Examination information technology and then get Alive by pressing theSubmitbutton in the top-correct corner of the GTM interface (+ complete all the steps that you will exist asked).

Some other tip – right after yous (or your programmer) adds a GTM snippet to a new website, publish a version of the empty container (with default settings).

If an unpublished GTM container's snippet is placed on a website, you'll go a 404 error ( Become http://world wide web.googletagmanager.com/gtm.js?id=GTM-XXXXXX) in the browser'southward Javascript console (acquire more about that here). This isn't a big trouble, but if your developers are tracking Javascript errors with detail tools (east.1000. TrackJS), they'll see those 404 errors in reports. This will create an unwanted noise for them (yes, I know they can use filters, simply simply publishing an empty container won't hurt anybody 🙂 ).

Fault #three – Using Data Layer variable before its corresponding dataLayer.button occurs

Hither's another mutual mistake. You have a tag that fires on theContainer Loadedevent. The tag is using a data layer variable, that accesses the page_category key from the information layer.

So every time a page_view consequence is fired, you also send the page_category to, say, Google Analytics 4.

But here's the trouble.page_datadataLayer.push (that contains the page_category) occurs simply afterward DOM Prepare. This ways that onContainer Loaded,page_category is not available yet, therefore, you lot volition always sendundefinedwith the GA4 tag.

It's important to sympathize this. Yous tin use a certain Information Layer variable only after that particular data is available in the Data Layer. What options do yous have in this instance?

  • Either fire a tag on that particular dataLayer.push button that contains thepage_categoryfundamental
  • Or enquire a developer to activate that dataLayer.push lawmaking before the GTM container snippet is loaded

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners

MISTAKE #4 – Not using preview and debug console properly

When an upshot is selected in the left column of the Preview and Debug console, the Tags tab volition prove the tags present during that result. They are split into Tags that fired and Tags that did not.

This is the identify where you should look for the answer toWhy didn't this tag fire? A tag will be fired only ifall conditions of a unmarried trigger are met. A red 10 icon indicates which weather weren't satisfied. Use them as clues and find out how you can fix the trigger.

I apologize a bit for the outdated screenshot of the preview mode. Simply in my defense, that does not change the essence here 🙂

Google tag manager preview and debug mode

If you desire to larn more almost proper debugging in GTM, feel free to read this guide.

GA debugger and Data Layer Inspector are among the most popular debugging tools you lot should exist aware of. Both of these are free Google Chrome extensions that will make your life much easier.

Information Layer Inspector is similar a Swiss army knife that adds additional information to the browser's console, besides allows y'all to temporarily inject the GTM container on whatsoever site, debug other analytics tools (including server-side setup), etc. Learn more here.

As forGA debugger, when it comes to Enhanced E-commerce tracking, GA debugger is irreplaceable for me (together with the GTM/GA debug). When enabled, it displays all information that is passed to Google Analytics, thus I can troubleshoot much faster.

In fact, I have prepared a comprehensive list of Chrome extensions and tools for GTM. Take a expect at this list hither.

Also, a bunch of debugging tips is explained here.

Error #vi – Not checking realtime reports or GA4 DebugView

I've seen a lot of beginners not checking their GA existent-time reports or GA4 DebugView one time they have implemented Google Analytics tracking via GTM. They had a false perception that one time the GA tag fired (co-ordinate to the Preview and Debug console), their task was completed.

But that was very far from the truth considering in some cases, they were accidentally sending data to the wrong Google Analytics property. Constantly checking existent-time reports prevents this issue. And in other cases, they were not seeing data at all (because of filter misconfiguration in GA).

common google tag manager mistakes - ga realtime

If on the other mitt, y'all are checking GA real-time reports only they are just non working, read this guide.

If you are working with Google Analytics four, and so the DebugView is your friend. If you want to acquire more, take a wait here.

Lastly, other tools that you want to implement (east.thou. Facebook Pixel) can also offer real-time debugging features. Always utilise them.

Mistake #vii – Not removing hardcoded tracking codes (completely)

If y'all have decided to migrate from hardcoded Google Analytics (or some other tool) to a more flexible implementation via Google Tag Manager, beware: the procedure won't be easy. This warning does not use to small-scale websites with basic tracking – just but add together GTM container snippet, publish Google Analytics tag (or some other tool'south tag) and simultaneously remove hardcoded tracking codes from a website.

But if you're thinking about migrating a larger website with more complex tracking, a lot of things tin get wrong. My due east-book for Google Tag Manager beginners covers some points related to migration.

The most mutual effect (from my experience) was non removing all hardcoded link tracking events which acquired information duplication. Some of those hardcoded events were simply missed past the developer.

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners

Fault #8 – Not using the GA Settings Variable in Universal Analytics

If you take ever tried to use Google Tag Managing director, you've probably noticed that for every Universal Analytics tag, yous need to set parameters/settings individually, e.g. Tracking ID, cookie settings, Cross-domain tracking parameters, etc.

Back in the former days, this was super difficult to manage. Y'all had to create a bunch of Constant (or other types of) variables and manually prepare in every GA tag.

Eventually, things have gotten much easier with the help of a Google Analytics Settings Variable. This is a fundamental place where your GA settings are kept. Whenever you lot want to create a Universal Analytics tag, yous just reuse the same GA Settings Variable that contains parameters similar Tracking ID, etc.

To learn more, read this guide.

MISTAKE #9 – Using dataLayer = []; and putting it after GTM snippet

Information Layer is a fundamental ingredient of a successful Google Tag Manager implementation. A data layer is an array that contains all of the information that you want to pass to Google Tag Manager. Few examples of what information tin can exist passed to dataLayer:

  • User's pricing program
  • User'due south registration state, etc.

What can you do with that data? Anything you like!

For case, you tin can pass the user's pricing plan as a custom dimension to Google Analytics. All the same, in that location'due south one catch (and if developers brand this mistake, your entire GTM result tracking will break).

If a programmer adds custom information to the Data Layer like this (I hateful dataLayer = xxxxxx):

var dataLayer = [{  'pricingPlan' : 'premium',  'registrationCountry' : 'Lithuania' }];

…and places this code snipper below the Google Tag Manager container JavaScript code, the Information Layer will exist broken.

No new events volition be visible in the Preview and Debug mode. In other words – things will go wrong.

So it's important that dataLayer's snippet (equally shown below) would exist placed higher up the GTM container snippet (according to Google's recommendation):

<script>  dataLayer = [{  'pricingPlan': 'Premium',  'registrationCountry': 'Uk'  }]; </script> <!-- Google Tag Director --> ... <!-- Terminate Google Tag Manager -->

Even a amend choice (MUCH MUCH BETTER) is to command dataLayer with dataLayer.push method. If you need any detail information to be passed to the dataLayer, ask your programmer to use the dataLayer.push button method instead (see the case beneath).

window.dataLayer = window.dataLayer || []; dataLayer.push({  'pricingPlan': 'Premium',  'registrationCountry': 'United kingdom' });

Are y'all a little tired? If yes, and then bookmark this blog post about common Google Tag Director mistakes and come dorsum afterwards. If non, allow's gyre!

Fault #10 – Not monitoring page operation after adding boosted codes/tags to GTM

When yous started using Google Tag Manager, you probably saw statements like "Google Tag Director optimizes page loading speed".

The reality is — "it depends". I have washed a bunch of tests and saw some improvement when you compare hardcoded tracking snippets (added direct to the website) vs tags added to GTM.

Yet, every added code piece to a website negatively impacts page loading speed. So if you add a agglomeration of different pixels, like Facebook Pixel, GA3, GA4, Reddit Pixel, Quora Pixel, Linkedin insight tag, and a agglomeration of other stuff, your page loading time will increment by A LOT.

Then after y'all add some new tags, it is a very skillful practice to take a look at your page speed. Actually, you should run several tests earlier adding the codes so compare them to what happens after you publish your changes.

I have published an article nearly GTM vs Pagespeed, so take a look there.

MISTAKE #11 – Typos (duh…)

I'll be quick here. When a tag doesn't burn down, always check for typos in:

  • Trigger'due south conditions. If you're using regular expressions in your atmospheric condition, double-cheque whether y'all demand standard regex orignore case choice.
  • Names of variables. This usually happens with Data Layer variables for me.

Also, keep in mind that the majority of fields in GTM are example-sensitive (or perchance all of them? I'm non sure.). This means that the Due south letter is not the same as the s.

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners

MISTAKE #12 – Not cooperating with developers

A lot of marketers and digital analysts started using Google Tag Manager (probably) because they believed the promise that they will not demand to rely on developers anymore. Ever.

The reality is quite the contrary. Even though Google Tag Managergreatly increases flexibility and the agility of marketing teams, developers might still be needed. Especially, when yous accept to deal with more complex setups or projects.

Google Analytics Ecommerce implementation is a good example. If y'all're working on a custom eastward-commerce platform, you Volition need to piece of work with developers and inquire them to push the transaction/product/checkout/etc. data to the Information Layer.

Trying to implement everything on your ain (and scrape the website for some data) will result in fragile setups that tin can easily pause.

Another thing – ask a developer to quickly review the custom JavaScript lawmaking you found online and now programme to implement via Custom HTML tag. I've seen mode too many cases when marketing teams added some unknown script and temporarily broke some features (or the unabridged frontend) of a website.

The end consequence of this? The marketing team lost admission to publish GTM container changes. Marketing/analytics teams and developers should be friends, not enemies.

MISTAKE #13 – Non Using Regex in order to reduce the number of conditions/triggers

What happens when you want to add together multiple conditions to burn down 1 tag? Usually, people create either multiple conditions in a trigger or assign multiple triggers to the same tag.

Multiple conditions instead of regex

Technically, this will piece of work, but at that place is a more than optimal way to do that, regular expressions (RegEx).

Instead of having, say, multiple "contains" conditions, y'all can match unlike data with just 1 Regular Expression. If you desire to have multiple weather condition connected with "OR", yous'll have to either create split up triggers and assign them to the same tag, or you lot can use just one trigger with a regular expression.

regex instead of multiple conditions

Aleksandrs Pasters has explained how you can utilise regex in GTM. Y'all should definitely check information technology out. Also, I constantly utilize Regex 101 online validator to cheque whether my regular expressions are configured correctly.

If you want to acquire more than nearly all the possible options on how to create "OR" weather in Google Tag Director, read this guide.

MISTAKE #xiv – Publishing all the changes at in one case

When you work on a agglomeration of new tracking features for a week so publish all of them at once, I telephone call this "large bang" deployment.

And this is non a good thing. If something goes wrong with your newly published container version, y'all volition have to revert the entire version (including things that were working).

The rule of thumb that I follow: piece of work with smaller portions. If you implement X tracking functionality, publish information technology. Then start working on another one. In that case, if something goes wrong with your latest version, your previous smaller batches that you published will withal be live and work fine.

MISTAKE #fifteen – Tracking forms with Click Trigger

This fault is popular among beginners who tried and failed to utilise a built-inClass Submissiontrigger in GTM. What they do not know, is that the Form Submission trigger sucks and does non work with the majority of online forms. At to the lowest degree that's what I've experienced.

And what do beginners do after the built-in trigger form does non work? Apparently, they choose a Click trigger as plan B, which is a super bad thought. Why? Considering click trigger tracks all clicks of aSubmit push button (not simply successful submissions)

If a visitor tries to submit the form just accidentally leaves a required field empty, the click trigger volition exist activated anyway. As a consequence, you lot'll accept mode too many form submissions/conversions which are false positives.

Solution? There is a bunch of other techniques on how to rails forms with Google Tag Managing director. Simply try ane of them.

MISTAKE #xvi – Not having a proper naming convention in place

Working in a GTM container that has a lot of tags/triggers/variables but every bit no decent naming convention is a real hell. Imagine that yous see a tag called "contact".

Contact what?

Is that a form submission of the contact form? Is that a click on a "contact usa" link. Is that something else?

If you have 10 or 20 tags, fifty-fifty the most terrible naming of your GTM avails can cause no problem. Just when you deal with 100+ items, you volition waste more than fourth dimension.

Merely you don't always know whether the new GTM container that you have but created volition somewhen go massive. So start using proper naming conventions from twenty-four hours one.

I have published a guide most GTM and GA conventions that y'all might detect useful.

Common Google Tag Manager Mistakes: Last words

In curt, we all do mistakes. If I got a penny for every error I've made… I'd probably have two pennies right now.

Just kidding! I'd be a millionaire. Mistakes teach us valuable lessons, that's why I wanted to share this list with you. Hopefully, you'll manage to avoid them.

Recollect, it'south much cheaper to learn from the mistakes made by others.

Do you know other common Google Tag Managing director mistakes?

Take you come across any other common Google Tag Manager mistakes? I'd really similar to hear them and add them to this listing. You can contact me via Twitter, LinkedIn, o just merely post a annotate below.

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners

cookesherstrand.blogspot.com

Source: https://www.analyticsmania.com/post/common-google-tag-manager-mistakes/

0 Response to "Invalid Input You May Have Stale Data"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel